From d29e27f983788416ca3f7f7c712e3c2723be5dea Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Mon, 21 Oct 2024 13:20:27 +0100 Subject: [PATCH 1/4] Allow for error message with " instead of ' --- tests/test_types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_types.py b/tests/test_types.py index 1e0a36e3..7c45f543 100644 --- a/tests/test_types.py +++ b/tests/test_types.py @@ -139,7 +139,7 @@ def test_localisation(self): 'WARNING:exiv2:Ungültiger Zeichensatz: "invalid"']) with self.assertRaises(exiv2.Exiv2Error) as cm: key = exiv2.ExifKey('not.a.tag') - self.assertEqual(cm.exception.message, + self.assertEqual(cm.exception.message.replace('"', "'"), "Ungültiger Schlüssel 'not.a.tag'") # clear locale name = 'en_US.UTF-8' From f6e426760183f98202c6e6f818e4882e68dacbae Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Mon, 21 Oct 2024 14:06:35 +0100 Subject: [PATCH 2/4] Update to SWIG version 4.3.0 --- src/interface/properties.i | 2 +- src/interface/shared/static_list.i | 2 +- src/swig-0_27_7/basicio.py | 2 +- src/swig-0_27_7/basicio_wrap.cxx | 810 ++- src/swig-0_27_7/datasets.py | 2 +- src/swig-0_27_7/datasets_wrap.cxx | 1670 +++-- src/swig-0_27_7/easyaccess.py | 2 +- src/swig-0_27_7/easyaccess_wrap.cxx | 527 +- src/swig-0_27_7/error.py | 2 +- src/swig-0_27_7/error_wrap.cxx | 822 ++- src/swig-0_27_7/exif.py | 2 +- src/swig-0_27_7/exif_wrap.cxx | 3014 +++++--- src/swig-0_27_7/image.py | 2 +- src/swig-0_27_7/image_wrap.cxx | 1269 ++-- src/swig-0_27_7/iptc.py | 2 +- src/swig-0_27_7/iptc_wrap.cxx | 2123 +++--- src/swig-0_27_7/metadatum.py | 2 +- src/swig-0_27_7/metadatum_wrap.cxx | 1261 ++-- src/swig-0_27_7/preview.py | 2 +- src/swig-0_27_7/preview_wrap.cxx | 1671 +++-- src/swig-0_27_7/properties.py | 2 +- src/swig-0_27_7/properties_wrap.cxx | 2099 +++--- src/swig-0_27_7/tags.py | 2 +- src/swig-0_27_7/tags_wrap.cxx | 2512 ++++--- src/swig-0_27_7/types.py | 2 +- src/swig-0_27_7/types_wrap.cxx | 2048 +++--- src/swig-0_27_7/value.py | 2 +- src/swig-0_27_7/value_wrap.cxx | 9749 ++++++++++++++++---------- src/swig-0_27_7/version.py | 2 +- src/swig-0_27_7/version_wrap.cxx | 399 +- src/swig-0_27_7/xmp.py | 2 +- src/swig-0_27_7/xmp_wrap.cxx | 2557 ++++--- src/swig-0_28_3/basicio.py | 2 +- src/swig-0_28_3/basicio_wrap.cxx | 830 ++- src/swig-0_28_3/datasets.py | 2 +- src/swig-0_28_3/datasets_wrap.cxx | 1668 +++-- src/swig-0_28_3/easyaccess.py | 2 +- src/swig-0_28_3/easyaccess_wrap.cxx | 527 +- src/swig-0_28_3/error.py | 2 +- src/swig-0_28_3/error_wrap.cxx | 822 ++- src/swig-0_28_3/exif.py | 2 +- src/swig-0_28_3/exif_wrap.cxx | 3040 +++++--- src/swig-0_28_3/image.py | 2 +- src/swig-0_28_3/image_wrap.cxx | 1271 ++-- src/swig-0_28_3/iptc.py | 2 +- src/swig-0_28_3/iptc_wrap.cxx | 2144 +++--- src/swig-0_28_3/metadatum.py | 2 +- src/swig-0_28_3/metadatum_wrap.cxx | 1277 ++-- src/swig-0_28_3/preview.py | 2 +- src/swig-0_28_3/preview_wrap.cxx | 1671 +++-- src/swig-0_28_3/properties.py | 2 +- src/swig-0_28_3/properties_wrap.cxx | 2099 +++--- src/swig-0_28_3/tags.py | 2 +- src/swig-0_28_3/tags_wrap.cxx | 2510 ++++--- src/swig-0_28_3/types.py | 2 +- src/swig-0_28_3/types_wrap.cxx | 2056 +++--- src/swig-0_28_3/value.py | 2 +- src/swig-0_28_3/value_wrap.cxx | 9987 +++++++++++++++++---------- src/swig-0_28_3/version.py | 2 +- src/swig-0_28_3/version_wrap.cxx | 399 +- src/swig-0_28_3/xmp.py | 2 +- src/swig-0_28_3/xmp_wrap.cxx | 2577 ++++--- utils/build_swig.py | 2 +- 63 files changed, 40657 insertions(+), 24818 deletions(-) diff --git a/src/interface/properties.i b/src/interface/properties.i index 366dc967..23f744ff 100644 --- a/src/interface/properties.i +++ b/src/interface/properties.i @@ -71,7 +71,7 @@ DEFINE_ENUM(XmpCategory, "Category of an XMP property.", PyDict_SetItemString(dict, i->first.c_str(), value); Py_DECREF(value); } - $result = SWIG_Python_AppendOutput($result, dict); + $result = SWIG_AppendOutput($result, dict); } // Convert XmpProperties.propertyList() result and XmpNsInfo.xmpPropertyInfo_ diff --git a/src/interface/shared/static_list.i b/src/interface/shared/static_list.i index 79260711..f8ceb101 100644 --- a/src/interface/shared/static_list.i +++ b/src/interface/shared/static_list.i @@ -38,6 +38,6 @@ static PyObject* pointer_to_list(item_type* ptr) { PyObject* list = pointer_to_list($1); if (!list) SWIG_fail; - $result = SWIG_Python_AppendOutput($result, list); + $result = SWIG_AppendOutput($result, list); } %enddef // LIST_POINTER diff --git a/src/swig-0_27_7/basicio.py b/src/swig-0_27_7/basicio.py index da6ee78b..009321b8 100644 --- a/src/swig-0_27_7/basicio.py +++ b/src/swig-0_27_7/basicio.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_27_7/basicio_wrap.cxx b/src/swig-0_27_7/basicio_wrap.cxx index cbf13b96..6f078495 100644 --- a/src/swig-0_27_7/basicio_wrap.cxx +++ b/src/swig-0_27_7/basicio_wrap.cxx @@ -1,19 +1,20 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_THREADS #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_basicio" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -148,6 +149,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -201,11 +206,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -824,10 +842,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -846,10 +860,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -870,10 +885,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -903,6 +914,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -944,6 +968,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -965,14 +992,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1002,7 +1029,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1187,7 +1214,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1208,13 +1235,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1224,7 +1251,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1232,11 +1259,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1245,12 +1272,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1374,21 +1401,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1453,7 +1480,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1469,9 +1496,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1504,9 +1531,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1607,7 +1637,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1650,27 +1680,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1694,10 +1724,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1725,7 +1755,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1754,10 +1784,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1784,14 +1814,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1821,7 +1851,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1860,15 +1890,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1912,7 +1945,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1923,7 +1956,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1931,13 +1964,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1950,7 +1983,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1959,7 +1992,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1993,9 +2026,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2016,7 +2049,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2076,9 +2109,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2134,9 +2167,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2166,7 +2202,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2189,7 +2225,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2247,16 +2283,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2270,13 +2309,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2292,9 +2331,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2350,9 +2389,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2399,7 +2441,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2452,7 +2494,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2479,7 +2526,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2489,7 +2536,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2615,7 +2662,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2653,8 +2700,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2714,13 +2761,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2737,24 +2784,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2791,7 +2838,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2855,7 +2902,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2924,11 +2971,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2948,10 +2995,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2971,11 +3018,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2999,15 +3046,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3039,6 +3086,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3065,8 +3113,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3110,7 +3158,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3125,20 +3173,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3211,7 +3259,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3243,11 +3291,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3265,15 +3313,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3423,6 +3471,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3514,6 +3565,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3537,19 +3591,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3559,23 +3613,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3613,7 +3665,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3622,15 +3674,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3645,7 +3697,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3669,10 +3721,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3688,14 +3740,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3721,7 +3773,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3738,7 +3790,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3756,13 +3808,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3778,7 +3830,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3792,7 +3844,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3809,13 +3861,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3831,12 +3883,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3851,7 +3903,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3866,16 +3918,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3902,7 +3954,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -3977,7 +4029,6 @@ static swig_module_info swig_module = {swig_types, 22, 0, 0, 0, 0}; # define SWIG_init init_basicio #endif -#define SWIG_name "_basicio" #ifdef __cplusplus #include @@ -4047,7 +4098,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4055,7 +4106,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4063,8 +4114,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4073,7 +4124,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4096,7 +4147,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4110,11 +4161,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4268,7 +4317,7 @@ static void _set_python_exception() { - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4936,7 +4985,7 @@ SWIGINTERN PyObject *_wrap_BasicIo_write__SWIG_1(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BasicIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BasicIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "BasicIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); } arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); { @@ -5240,7 +5289,7 @@ SWIGINTERN PyObject *_wrap_BasicIo_transfer(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BasicIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BasicIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "BasicIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); } arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); { @@ -5603,16 +5652,16 @@ SwigPyBuiltin__Exiv2__BasicIo_richcompare(PyObject *self, PyObject *other, int o PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -5799,42 +5848,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__BasicIo_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__BasicIo_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.basicio.BasicIo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_BasicIo_destructor_closure, /* tp_dealloc */ + "exiv2.basicio.BasicIo", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_BasicIo_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -5844,176 +5894,297 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__BasicIo_type = { "Designed to have semantics and names similar to those of C style FILE*\n" "operations. Subclasses should all behave the same so that they can be\n" "interchanged.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__BasicIo_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__BasicIo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__BasicIo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__BasicIo_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__BasicIo_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__BasicIo_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_BasicIo_size_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + _wrap_BasicIo_size_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - getbuffer_Exiv2_BasicIo, /* bf_getbuffer */ - releasebuffer_Exiv2_BasicIo, /* bf_releasebuffer */ + getbuffer_Exiv2_BasicIo, /* bf_getbuffer */ + releasebuffer_Exiv2_BasicIo, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__BasicIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__BasicIo_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__BasicIo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__BasicIo_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'BasicIo'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__BasicIo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete_BasicIo_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "An interface for simple binary IO.\n" + "\n" + "Designed to have semantics and names similar to those of C style FILE*\n" + "operations. Subclasses should all behave the same so that they can be\n" + "interchanged.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__BasicIo_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__BasicIo_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__BasicIo_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_BasicIo_size_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.basicio.BasicIo", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__BasicIo_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -6415,7 +6586,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -6598,7 +6769,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -6624,8 +6795,7 @@ SWIG_init(void) { /* type 'Exiv2::BasicIo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__BasicIo_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); { PyObject* module = PyImport_ImportModule("enum"); @@ -6639,22 +6809,20 @@ SWIG_init(void) { SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "Position",_create_enum_Exiv2_BasicIo_Position( "Position", "Seek starting positions.", _get_enum_list(0, "beg",Exiv2::BasicIo::beg,"cur",Exiv2::BasicIo::cur,"end",Exiv2::BasicIo::end, NULL))); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'BasicIo'."); + builtin_pytype = SwigPyBuiltin__Exiv2__BasicIo_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__BasicIo_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "BasicIo", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "BasicIo"); d = md; diff --git a/src/swig-0_27_7/datasets.py b/src/swig-0_27_7/datasets.py index 80293823..5de4aa81 100644 --- a/src/swig-0_27_7/datasets.py +++ b/src/swig-0_27_7/datasets.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_27_7/datasets_wrap.cxx b/src/swig-0_27_7/datasets_wrap.cxx index 0d6a612e..d2de5fa5 100644 --- a/src/swig-0_27_7/datasets_wrap.cxx +++ b/src/swig-0_27_7/datasets_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_datasets" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -4002,7 +4054,6 @@ static swig_module_info swig_module = {swig_types, 48, 0, 0, 0, 0}; # define SWIG_init init_datasets #endif -#define SWIG_name "_datasets" #ifdef __cplusplus #include @@ -4072,7 +4123,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4080,7 +4131,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4088,8 +4139,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4098,7 +4149,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4121,7 +4172,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4135,11 +4186,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4290,7 +4339,7 @@ static void _set_python_exception() { - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4475,7 +4524,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -4498,10 +4547,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -4536,12 +4585,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -5124,7 +5169,7 @@ SWIGINTERN PyObject *_wrap_DataSet___getitem__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DataSet___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DataSet___getitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "DataSet___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -5169,7 +5214,7 @@ SWIGINTERN PyObject *_wrap_DataSet___setitem__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DataSet___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DataSet___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "DataSet___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -5358,7 +5403,7 @@ SWIGINTERN PyObject *_wrap_IptcDataSets_dataSet(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IptcDataSets_dataSet" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcDataSets_dataSet" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcDataSets_dataSet" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5481,7 +5526,7 @@ SWIGINTERN PyObject *_wrap_IptcDataSets_recordId(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IptcDataSets_recordId" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcDataSets_recordId" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcDataSets_recordId" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5513,7 +5558,7 @@ SWIGINTERN PyObject *_wrap_IptcDataSets_envelopeRecordList(PyObject *self, PyObj PyObject* list = pointer_to_list(result); if (!list) SWIG_fail; - resultobj = SWIG_Python_AppendOutput(resultobj, list); + resultobj = SWIG_Python_AppendOutput(resultobj, list, 0); } return resultobj; fail: @@ -5531,7 +5576,7 @@ SWIGINTERN PyObject *_wrap_IptcDataSets_application2RecordList(PyObject *self, P PyObject* list = pointer_to_list(result); if (!list) SWIG_fail; - resultobj = SWIG_Python_AppendOutput(resultobj, list); + resultobj = SWIG_Python_AppendOutput(resultobj, list, 0); } return resultobj; fail: @@ -5553,7 +5598,7 @@ SWIGINTERN int _wrap_new_IptcKey__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IptcKey" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IptcKey" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_IptcKey" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5617,7 +5662,7 @@ SWIGINTERN int _wrap_new_IptcKey__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IptcKey" "', argument " "1"" of type '" "Exiv2::IptcKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IptcKey" "', argument " "1"" of type '" "Exiv2::IptcKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_IptcKey" "', argument " "1"" of type '" "Exiv2::IptcKey const &""'"); } arg1 = reinterpret_cast< Exiv2::IptcKey * >(argp1); result = (Exiv2::IptcKey *)new Exiv2::IptcKey((Exiv2::IptcKey const &)*arg1); @@ -5902,18 +5947,18 @@ static SwigPyGetSet DataSet_recordId__getset = { _wrap_DataSet_recordId__get, 0 static SwigPyGetSet DataSet_mandatory__getset = { _wrap_DataSet_mandatory__get, 0 }; static SwigPyGetSet DataSet_minbytes__getset = { _wrap_DataSet_minbytes__get, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__DataSet_getset[] = { - { (char *)"title_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Dataset title or label", &DataSet_title__getset }, - { (char *)"photoshop_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Photoshop string", &DataSet_photoshop__getset }, - { (char *)"desc_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Dataset description", &DataSet_desc__getset }, - { (char *)"repeatable_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" True if dataset is repeatable", &DataSet_repeatable__getset }, - { (char *)"number_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Dataset number", &DataSet_number__getset }, - { (char *)"maxbytes_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Maximum number of bytes", &DataSet_maxbytes__getset }, - { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Dataset number", &DataSet___dict___getset }, - { (char *)"name_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Dataset name", &DataSet_name__getset }, - { (char *)"type_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Exiv2 default type", &DataSet_type__getset }, - { (char *)"recordId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Record id", &DataSet_recordId__getset }, - { (char *)"mandatory_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" True if dataset is mandatory", &DataSet_mandatory__getset }, - { (char *)"minbytes_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Minimum number of bytes", &DataSet_minbytes__getset }, + { (char *)"title_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Dataset title or label", &DataSet_title__getset }, + { (char *)"photoshop_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Photoshop string", &DataSet_photoshop__getset }, + { (char *)"desc_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Dataset description", &DataSet_desc__getset }, + { (char *)"repeatable_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"True if dataset is repeatable", &DataSet_repeatable__getset }, + { (char *)"number_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Dataset number", &DataSet_number__getset }, + { (char *)"maxbytes_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Maximum number of bytes", &DataSet_maxbytes__getset }, + { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Dataset number", &DataSet___dict___getset }, + { (char *)"name_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Dataset name", &DataSet_name__getset }, + { (char *)"type_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Exiv2 default type", &DataSet_type__getset }, + { (char *)"recordId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Record id", &DataSet_recordId__getset }, + { (char *)"mandatory_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"True if dataset is mandatory", &DataSet_mandatory__getset }, + { (char *)"minbytes_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Minimum number of bytes", &DataSet_minbytes__getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -5925,7 +5970,7 @@ SwigPyBuiltin__Exiv2__DataSet_richcompare(PyObject *self, PyObject *other, int o result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -5955,215 +6000,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DataSet_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__DataSet_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.datasets.DataSet", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.datasets.DataSet", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__DataSet_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__DataSet_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__DataSet_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__DataSet_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__DataSet_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__DataSet_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__DataSet_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__DataSet_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Details of an IPTC dataset.", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__DataSet_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_DataSet___iter___getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__DataSet_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__DataSet_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Details of an IPTC dataset.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__DataSet_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_DataSet___iter___getiterfunc_closure, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__DataSet_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__DataSet_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - _wrap_DataSet___getitem__, /* mp_subscript */ - _wrap_DataSet___setitem___objobjargproc_closure, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + _wrap_DataSet___getitem__, /* mp_subscript */ + _wrap_DataSet___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__DataSet_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__DataSet_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__DataSet_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__DataSet_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'DataSet'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__DataSet_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Details of an IPTC dataset." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__DataSet_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__DataSet_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__DataSet_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)_wrap_DataSet___getitem__ }, + { Py_mp_ass_subscript, (void *)_wrap_DataSet___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_DataSet___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.datasets.DataSet", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__DataSet_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet IptcDataSets___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__IptcDataSets_getset[] = { @@ -6189,7 +6350,7 @@ SwigPyBuiltin__Exiv2__IptcDataSets_richcompare(PyObject *self, PyObject *other, result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -6257,7 +6418,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__IptcDataSets_methods[] = { "\n" ":raises: Error if the *dataSetName* or *recordId* are invalid\n" "" }, - { "dataSetType", (PyCFunction)(void(*)(void))_wrap_IptcDataSets_dataSetType, METH_STATIC|METH_VARARGS, " Return the type for dataSet number and Record id" }, + { "dataSetType", (PyCFunction)(void(*)(void))_wrap_IptcDataSets_dataSetType, METH_STATIC|METH_VARARGS, "Return the type for dataSet number and Record id" }, { "recordName", (PyCFunction)(void(*)(void))_wrap_IptcDataSets_recordName, METH_STATIC|METH_O, "\n" "Return the name of the Record\n" ":type recordId: int\n" @@ -6282,220 +6443,336 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__IptcDataSets_methods[] = { ":return: the Id number of a Record\n" ":raises: Error if the record is not known;\n" "" }, - { "envelopeRecordList", (PyCFunction)(void(*)(void))_wrap_IptcDataSets_envelopeRecordList, METH_STATIC|METH_NOARGS, " Return read-only list of built-in Envelope Record datasets" }, - { "application2RecordList", (PyCFunction)(void(*)(void))_wrap_IptcDataSets_application2RecordList, METH_STATIC|METH_NOARGS, " Return read-only list of built-in Application2 Record datasets" }, + { "envelopeRecordList", (PyCFunction)(void(*)(void))_wrap_IptcDataSets_envelopeRecordList, METH_STATIC|METH_NOARGS, "Return read-only list of built-in Envelope Record datasets" }, + { "application2RecordList", (PyCFunction)(void(*)(void))_wrap_IptcDataSets_application2RecordList, METH_STATIC|METH_NOARGS, "Return read-only list of built-in Application2 Record datasets" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__IptcDataSets_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.datasets.IptcDataSets", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.datasets.IptcDataSets", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__IptcDataSets_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__IptcDataSets_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__IptcDataSets_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__IptcDataSets_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__IptcDataSets_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__IptcDataSets_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__IptcDataSets_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__IptcDataSets_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " IPTC dataset reference, implemented as a static class.", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__IptcDataSets_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__IptcDataSets_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__IptcDataSets_getset,/* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "IPTC dataset reference, implemented as a static class.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__IptcDataSets_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__IptcDataSets_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__IptcDataSets_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__IptcDataSets_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__IptcDataSets_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__IptcDataSets_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__IptcDataSets_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcDataSets'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__IptcDataSets_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"IPTC dataset reference, implemented as a static class." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__IptcDataSets_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__IptcDataSets_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__IptcDataSets_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.datasets.IptcDataSets", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__IptcDataSets_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet IptcKey___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__IptcKey_getset[] = { @@ -6536,7 +6813,7 @@ SwigPyBuiltin__Exiv2__IptcKey_richcompare(PyObject *self, PyObject *other, int o result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -6553,220 +6830,336 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__IptcKey_methods[] = { { "tagLabel", _wrap_IptcKey_tagLabel, METH_NOARGS, "" }, { "tag", _wrap_IptcKey_tag, METH_NOARGS, "" }, { "clone", _wrap_IptcKey_clone, METH_NOARGS, "" }, - { "recordName", _wrap_IptcKey_recordName, METH_NOARGS, " Return the name of the record" }, - { "record", _wrap_IptcKey_record, METH_NOARGS, " Return the record id" }, + { "recordName", _wrap_IptcKey_recordName, METH_NOARGS, "Return the name of the record" }, + { "record", _wrap_IptcKey_record, METH_NOARGS, "Return the record id" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__IptcKey_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.datasets.IptcKey", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_IptcKey_destructor_closure, /* tp_dealloc */ + "exiv2.datasets.IptcKey", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_IptcKey_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__IptcKey_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__IptcKey_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__IptcKey_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - _wrap_IptcKey_key_reprfunc_closure, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__IptcKey_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__IptcKey_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__IptcKey_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__IptcKey_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + _wrap_IptcKey_key_reprfunc_closure, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__IptcKey_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Concrete keys for IPTC metadata.", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__IptcKey_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__IptcKey_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__IptcKey_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_IptcKey, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Concrete keys for IPTC metadata.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__IptcKey_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__IptcKey_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__IptcKey_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_IptcKey, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__IptcKey_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__IptcKey_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__IptcKey_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__IptcKey_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcKey'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__IptcKey_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_IptcKey }, + { Py_tp_dealloc, (void *)_wrap_delete_IptcKey_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Concrete keys for IPTC metadata." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)_wrap_IptcKey_key_reprfunc_closure }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__IptcKey_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__IptcKey_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__IptcKey_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.datasets.IptcKey", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__IptcKey_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -7323,7 +7716,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -7506,7 +7899,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -7532,31 +7925,27 @@ SWIG_init(void) { /* type 'Exiv2::DataSet' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__DataSet_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'DataSet'."); + builtin_pytype = SwigPyBuiltin__Exiv2__DataSet_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__DataSet_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "DataSet", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "DataSet"); d = md; /* type 'Exiv2::IptcDataSets' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__IptcDataSets_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "invalidRecord",SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Exiv2::IptcDataSets::invalidRecord))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "envelope",SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Exiv2::IptcDataSets::envelope))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "application2",SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Exiv2::IptcDataSets::application2))); @@ -7631,31 +8020,26 @@ SWIG_init(void) { SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "PreviewFormat",SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Exiv2::IptcDataSets::PreviewFormat))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "PreviewVersion",SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Exiv2::IptcDataSets::PreviewVersion))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "Preview",SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Exiv2::IptcDataSets::Preview))); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcDataSets'."); + builtin_pytype = SwigPyBuiltin__Exiv2__IptcDataSets_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__IptcDataSets_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "IptcDataSets", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "IptcDataSets"); d = md; /* type 'Exiv2::IptcKey' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__IptcKey_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Key"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -7669,18 +8053,18 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcKey'."); + builtin_pytype = SwigPyBuiltin__Exiv2__IptcKey_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__IptcKey_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "IptcKey", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "IptcKey"); d = md; diff --git a/src/swig-0_27_7/easyaccess.py b/src/swig-0_27_7/easyaccess.py index 3e7d672a..504a872a 100644 --- a/src/swig-0_27_7/easyaccess.py +++ b/src/swig-0_27_7/easyaccess.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_27_7/easyaccess_wrap.cxx b/src/swig-0_27_7/easyaccess_wrap.cxx index cf47c977..9b704c14 100644 --- a/src/swig-0_27_7/easyaccess_wrap.cxx +++ b/src/swig-0_27_7/easyaccess_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_easyaccess" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -3958,7 +4010,6 @@ static swig_module_info swig_module = {swig_types, 4, 0, 0, 0, 0}; # define SWIG_init init_easyaccess #endif -#define SWIG_name "_easyaccess" #ifdef __cplusplus #include @@ -4028,7 +4079,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4036,7 +4087,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4044,8 +4095,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4054,7 +4105,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4077,7 +4128,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4091,11 +4142,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4246,7 +4295,7 @@ static void _set_python_exception() { - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4286,7 +4335,7 @@ SWIGINTERN PyObject *_wrap_orientation(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "orientation" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "orientation" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "orientation" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4330,7 +4379,7 @@ SWIGINTERN PyObject *_wrap_isoSpeed(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "isoSpeed" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "isoSpeed" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "isoSpeed" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4374,7 +4423,7 @@ SWIGINTERN PyObject *_wrap_dateTimeOriginal(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dateTimeOriginal" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dateTimeOriginal" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "dateTimeOriginal" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4422,7 +4471,7 @@ SWIGINTERN PyObject *_wrap_flashBias(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flashBias" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flashBias" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "flashBias" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4466,7 +4515,7 @@ SWIGINTERN PyObject *_wrap_exposureMode(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "exposureMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "exposureMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "exposureMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4510,7 +4559,7 @@ SWIGINTERN PyObject *_wrap_sceneMode(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sceneMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "sceneMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "sceneMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4554,7 +4603,7 @@ SWIGINTERN PyObject *_wrap_macroMode(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "macroMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "macroMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "macroMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4598,7 +4647,7 @@ SWIGINTERN PyObject *_wrap_imageQuality(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "imageQuality" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "imageQuality" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "imageQuality" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4642,7 +4691,7 @@ SWIGINTERN PyObject *_wrap_whiteBalance(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "whiteBalance" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "whiteBalance" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "whiteBalance" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4686,7 +4735,7 @@ SWIGINTERN PyObject *_wrap_lensName(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lensName" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "lensName" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "lensName" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4730,7 +4779,7 @@ SWIGINTERN PyObject *_wrap_saturation(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "saturation" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "saturation" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "saturation" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4774,7 +4823,7 @@ SWIGINTERN PyObject *_wrap_sharpness(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sharpness" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "sharpness" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "sharpness" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4818,7 +4867,7 @@ SWIGINTERN PyObject *_wrap_contrast(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "contrast" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "contrast" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "contrast" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4862,7 +4911,7 @@ SWIGINTERN PyObject *_wrap_sceneCaptureType(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sceneCaptureType" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "sceneCaptureType" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "sceneCaptureType" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4906,7 +4955,7 @@ SWIGINTERN PyObject *_wrap_meteringMode(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "meteringMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "meteringMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "meteringMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4950,7 +4999,7 @@ SWIGINTERN PyObject *_wrap_make(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "make" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "make" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "make" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4994,7 +5043,7 @@ SWIGINTERN PyObject *_wrap_model(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "model" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "model" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "model" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5038,7 +5087,7 @@ SWIGINTERN PyObject *_wrap_exposureTime(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "exposureTime" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "exposureTime" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "exposureTime" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5082,7 +5131,7 @@ SWIGINTERN PyObject *_wrap_fNumber(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fNumber" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fNumber" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "fNumber" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5126,7 +5175,7 @@ SWIGINTERN PyObject *_wrap_shutterSpeedValue(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "shutterSpeedValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "shutterSpeedValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "shutterSpeedValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5174,7 +5223,7 @@ SWIGINTERN PyObject *_wrap_apertureValue(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "apertureValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "apertureValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "apertureValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5222,7 +5271,7 @@ SWIGINTERN PyObject *_wrap_brightnessValue(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "brightnessValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "brightnessValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "brightnessValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5270,7 +5319,7 @@ SWIGINTERN PyObject *_wrap_exposureBiasValue(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "exposureBiasValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "exposureBiasValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "exposureBiasValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5318,7 +5367,7 @@ SWIGINTERN PyObject *_wrap_maxApertureValue(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "maxApertureValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "maxApertureValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "maxApertureValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5366,7 +5415,7 @@ SWIGINTERN PyObject *_wrap_subjectDistance(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "subjectDistance" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "subjectDistance" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "subjectDistance" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5410,7 +5459,7 @@ SWIGINTERN PyObject *_wrap_lightSource(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lightSource" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "lightSource" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "lightSource" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5458,7 +5507,7 @@ SWIGINTERN PyObject *_wrap_flash(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flash" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flash" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "flash" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5506,7 +5555,7 @@ SWIGINTERN PyObject *_wrap_serialNumber(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "serialNumber" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "serialNumber" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "serialNumber" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5550,7 +5599,7 @@ SWIGINTERN PyObject *_wrap_focalLength(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "focalLength" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "focalLength" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "focalLength" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5594,7 +5643,7 @@ SWIGINTERN PyObject *_wrap_subjectArea(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "subjectArea" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "subjectArea" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "subjectArea" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5642,7 +5691,7 @@ SWIGINTERN PyObject *_wrap_flashEnergy(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flashEnergy" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flashEnergy" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "flashEnergy" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5690,7 +5739,7 @@ SWIGINTERN PyObject *_wrap_exposureIndex(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "exposureIndex" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "exposureIndex" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "exposureIndex" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5738,7 +5787,7 @@ SWIGINTERN PyObject *_wrap_sensingMethod(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sensingMethod" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "sensingMethod" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "sensingMethod" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5786,7 +5835,7 @@ SWIGINTERN PyObject *_wrap_afPoint(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "afPoint" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "afPoint" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "afPoint" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5815,40 +5864,40 @@ SWIGINTERN PyObject *_wrap_afPoint(PyObject *self, PyObject *args) { static PyMethodDef SwigMethods[] = { - { "orientation", _wrap_orientation, METH_O, " Return the orientation of the image"}, - { "isoSpeed", _wrap_isoSpeed, METH_O, " Return the ISO speed used to shoot the image"}, - { "dateTimeOriginal", _wrap_dateTimeOriginal, METH_O, " Return the date and time when the original image data was generated"}, - { "flashBias", _wrap_flashBias, METH_O, " Return the flash bias value"}, - { "exposureMode", _wrap_exposureMode, METH_O, " Return the exposure mode setting"}, - { "sceneMode", _wrap_sceneMode, METH_O, " Return the scene mode setting"}, - { "macroMode", _wrap_macroMode, METH_O, " Return the macro mode setting"}, - { "imageQuality", _wrap_imageQuality, METH_O, " Return the image quality setting"}, - { "whiteBalance", _wrap_whiteBalance, METH_O, " Return the white balance setting"}, - { "lensName", _wrap_lensName, METH_O, " Return the name of the lens used"}, - { "saturation", _wrap_saturation, METH_O, " Return the saturation level"}, - { "sharpness", _wrap_sharpness, METH_O, " Return the sharpness level"}, - { "contrast", _wrap_contrast, METH_O, " Return the contrast level"}, - { "sceneCaptureType", _wrap_sceneCaptureType, METH_O, " Return the scene capture type"}, - { "meteringMode", _wrap_meteringMode, METH_O, " Return the metering mode setting"}, - { "make", _wrap_make, METH_O, " Return the camera make"}, - { "model", _wrap_model, METH_O, " Return the camera model"}, - { "exposureTime", _wrap_exposureTime, METH_O, " Return the exposure time"}, - { "fNumber", _wrap_fNumber, METH_O, " Return the F number"}, - { "shutterSpeedValue", _wrap_shutterSpeedValue, METH_O, " Return the shutter speed value"}, - { "apertureValue", _wrap_apertureValue, METH_O, " Return the aperture value"}, - { "brightnessValue", _wrap_brightnessValue, METH_O, " Return the brightness value"}, - { "exposureBiasValue", _wrap_exposureBiasValue, METH_O, " Return the exposure bias value"}, - { "maxApertureValue", _wrap_maxApertureValue, METH_O, " Return the max aperture value"}, - { "subjectDistance", _wrap_subjectDistance, METH_O, " Return the subject distance"}, - { "lightSource", _wrap_lightSource, METH_O, " Return the kind of light source"}, - { "flash", _wrap_flash, METH_O, " Return the status of flash"}, - { "serialNumber", _wrap_serialNumber, METH_O, " Return the camera serial number"}, - { "focalLength", _wrap_focalLength, METH_O, " Return the focal length setting"}, - { "subjectArea", _wrap_subjectArea, METH_O, " Return the subject location and area"}, - { "flashEnergy", _wrap_flashEnergy, METH_O, " Return the flash energy"}, - { "exposureIndex", _wrap_exposureIndex, METH_O, " Return the exposure index"}, - { "sensingMethod", _wrap_sensingMethod, METH_O, " Return the image sensor type"}, - { "afPoint", _wrap_afPoint, METH_O, " Return the AF point"}, + { "orientation", _wrap_orientation, METH_O, "Return the orientation of the image"}, + { "isoSpeed", _wrap_isoSpeed, METH_O, "Return the ISO speed used to shoot the image"}, + { "dateTimeOriginal", _wrap_dateTimeOriginal, METH_O, "Return the date and time when the original image data was generated"}, + { "flashBias", _wrap_flashBias, METH_O, "Return the flash bias value"}, + { "exposureMode", _wrap_exposureMode, METH_O, "Return the exposure mode setting"}, + { "sceneMode", _wrap_sceneMode, METH_O, "Return the scene mode setting"}, + { "macroMode", _wrap_macroMode, METH_O, "Return the macro mode setting"}, + { "imageQuality", _wrap_imageQuality, METH_O, "Return the image quality setting"}, + { "whiteBalance", _wrap_whiteBalance, METH_O, "Return the white balance setting"}, + { "lensName", _wrap_lensName, METH_O, "Return the name of the lens used"}, + { "saturation", _wrap_saturation, METH_O, "Return the saturation level"}, + { "sharpness", _wrap_sharpness, METH_O, "Return the sharpness level"}, + { "contrast", _wrap_contrast, METH_O, "Return the contrast level"}, + { "sceneCaptureType", _wrap_sceneCaptureType, METH_O, "Return the scene capture type"}, + { "meteringMode", _wrap_meteringMode, METH_O, "Return the metering mode setting"}, + { "make", _wrap_make, METH_O, "Return the camera make"}, + { "model", _wrap_model, METH_O, "Return the camera model"}, + { "exposureTime", _wrap_exposureTime, METH_O, "Return the exposure time"}, + { "fNumber", _wrap_fNumber, METH_O, "Return the F number"}, + { "shutterSpeedValue", _wrap_shutterSpeedValue, METH_O, "Return the shutter speed value"}, + { "apertureValue", _wrap_apertureValue, METH_O, "Return the aperture value"}, + { "brightnessValue", _wrap_brightnessValue, METH_O, "Return the brightness value"}, + { "exposureBiasValue", _wrap_exposureBiasValue, METH_O, "Return the exposure bias value"}, + { "maxApertureValue", _wrap_maxApertureValue, METH_O, "Return the max aperture value"}, + { "subjectDistance", _wrap_subjectDistance, METH_O, "Return the subject distance"}, + { "lightSource", _wrap_lightSource, METH_O, "Return the kind of light source"}, + { "flash", _wrap_flash, METH_O, "Return the status of flash"}, + { "serialNumber", _wrap_serialNumber, METH_O, "Return the camera serial number"}, + { "focalLength", _wrap_focalLength, METH_O, "Return the focal length setting"}, + { "subjectArea", _wrap_subjectArea, METH_O, "Return the subject location and area"}, + { "flashEnergy", _wrap_flashEnergy, METH_O, "Return the flash energy"}, + { "exposureIndex", _wrap_exposureIndex, METH_O, "Return the exposure index"}, + { "sensingMethod", _wrap_sensingMethod, METH_O, "Return the image sensor type"}, + { "afPoint", _wrap_afPoint, METH_O, "Return the AF point"}, { NULL, NULL, 0, NULL } }; @@ -6151,7 +6200,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -6334,7 +6383,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) diff --git a/src/swig-0_27_7/error.py b/src/swig-0_27_7/error.py index 5e2ba745..d6d37f05 100644 --- a/src/swig-0_27_7/error.py +++ b/src/swig-0_27_7/error.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_27_7/error_wrap.cxx b/src/swig-0_27_7/error_wrap.cxx index 5f6b91bd..5cb901c6 100644 --- a/src/swig-0_27_7/error_wrap.cxx +++ b/src/swig-0_27_7/error_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_error" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -3960,7 +4012,6 @@ static swig_module_info swig_module = {swig_types, 6, 0, 0, 0, 0}; # define SWIG_init init_error #endif -#define SWIG_name "_error" #ifdef __cplusplus #include @@ -4030,7 +4081,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4038,7 +4089,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4046,8 +4097,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4056,7 +4107,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4079,7 +4130,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4093,11 +4144,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4414,7 +4463,7 @@ SwigPyBuiltin__Exiv2__LogMsg_richcompare(PyObject *self, PyObject *other, int op result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -4432,47 +4481,48 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__LogMsg_methods[] = { " messages to standard error. To suppress all log messages, set\n" " the log message handler to 0 (or set the log level to ``mute)``.\n" "" }, - { "level", (PyCFunction)(void(*)(void))_wrap_LogMsg_level, METH_STATIC|METH_NOARGS, " Return the current log level" }, - { "handler", (PyCFunction)(void(*)(void))_wrap_LogMsg_handler, METH_STATIC|METH_NOARGS, " Return the current log message handler" }, + { "level", (PyCFunction)(void(*)(void))_wrap_LogMsg_level, METH_STATIC|METH_NOARGS, "Return the current log level" }, + { "handler", (PyCFunction)(void(*)(void))_wrap_LogMsg_handler, METH_STATIC|METH_NOARGS, "Return the current log message handler" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__LogMsg_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.error.LogMsg", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.error.LogMsg", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__LogMsg_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__LogMsg_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__LogMsg_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__LogMsg_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__LogMsg_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__LogMsg_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__LogMsg_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__LogMsg_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -4502,176 +4552,317 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__LogMsg_type = { "\n" " Caveat: The entire log message is not processed in this case. So don't\n" " make that call any logic that always needs to be executed.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ SwigPyBuiltin__Exiv2__LogMsg_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__LogMsg_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__LogMsg_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__LogMsg_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__LogMsg_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__LogMsg_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__LogMsg_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__LogMsg_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__LogMsg_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'LogMsg'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__LogMsg_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Class for a log message, used by the library. Applications can set\n" + " the log level and provide a customer log message handler (callback\n" + " function).\n" + "\n" + " This class is meant to be used as a temporary object with the\n" + " related macro-magic like this:\n" + "\n" + " ``\n" + " EXV_WARNING << \"Warning! Something looks fishy.\\n\";\n" + " ``\n" + "\n" + " which translates to\n" + "\n" + " ``\n" + " if (LogMsg::warn >= LogMsg::level() && LogMsg::handler())\n" + " LogMsg(LogMsg::warn).os() << \"Warning! Something looks fishy.\\n\";\n" + " ``\n" + "\n" + " The macros EXV_DEBUG, EXV_INFO, EXV_WARNING and EXV_ERROR are\n" + " shorthands and ensure efficient use of the logging facility: If a\n" + " log message doesn't need to be generated because of the log level\n" + " setting, the temp object is not even created.\n" + "\n" + " Caveat: The entire log message is not processed in this case. So don't\n" + " make that call any logic that always needs to be executed.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__LogMsg_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__LogMsg_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__LogMsg_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.error.LogMsg", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__LogMsg_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -4985,7 +5176,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -5168,7 +5359,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -5214,8 +5405,7 @@ SWIG_init(void) { "ErrorCode", "Complete list of all Exiv2 error codes.", _get_enum_list(0, "kerGeneralError",Exiv2::kerGeneralError,"kerSuccess",Exiv2::kerSuccess,"kerErrorMessage",Exiv2::kerErrorMessage,"kerCallFailed",Exiv2::kerCallFailed,"kerNotAnImage",Exiv2::kerNotAnImage,"kerInvalidDataset",Exiv2::kerInvalidDataset,"kerInvalidRecord",Exiv2::kerInvalidRecord,"kerInvalidKey",Exiv2::kerInvalidKey,"kerInvalidTag",Exiv2::kerInvalidTag,"kerValueNotSet",Exiv2::kerValueNotSet,"kerDataSourceOpenFailed",Exiv2::kerDataSourceOpenFailed,"kerFileOpenFailed",Exiv2::kerFileOpenFailed,"kerFileContainsUnknownImageType",Exiv2::kerFileContainsUnknownImageType,"kerMemoryContainsUnknownImageType",Exiv2::kerMemoryContainsUnknownImageType,"kerUnsupportedImageType",Exiv2::kerUnsupportedImageType,"kerFailedToReadImageData",Exiv2::kerFailedToReadImageData,"kerNotAJpeg",Exiv2::kerNotAJpeg,"kerFailedToMapFileForReadWrite",Exiv2::kerFailedToMapFileForReadWrite,"kerFileRenameFailed",Exiv2::kerFileRenameFailed,"kerTransferFailed",Exiv2::kerTransferFailed,"kerMemoryTransferFailed",Exiv2::kerMemoryTransferFailed,"kerInputDataReadFailed",Exiv2::kerInputDataReadFailed,"kerImageWriteFailed",Exiv2::kerImageWriteFailed,"kerNoImageInInputData",Exiv2::kerNoImageInInputData,"kerInvalidIfdId",Exiv2::kerInvalidIfdId,"kerValueTooLarge",Exiv2::kerValueTooLarge,"kerDataAreaValueTooLarge",Exiv2::kerDataAreaValueTooLarge,"kerOffsetOutOfRange",Exiv2::kerOffsetOutOfRange,"kerUnsupportedDataAreaOffsetType",Exiv2::kerUnsupportedDataAreaOffsetType,"kerInvalidCharset",Exiv2::kerInvalidCharset,"kerUnsupportedDateFormat",Exiv2::kerUnsupportedDateFormat,"kerUnsupportedTimeFormat",Exiv2::kerUnsupportedTimeFormat,"kerWritingImageFormatUnsupported",Exiv2::kerWritingImageFormatUnsupported,"kerInvalidSettingForImage",Exiv2::kerInvalidSettingForImage,"kerNotACrwImage",Exiv2::kerNotACrwImage,"kerFunctionNotSupported",Exiv2::kerFunctionNotSupported,"kerNoNamespaceInfoForXmpPrefix",Exiv2::kerNoNamespaceInfoForXmpPrefix,"kerNoPrefixForNamespace",Exiv2::kerNoPrefixForNamespace,"kerTooLargeJpegSegment",Exiv2::kerTooLargeJpegSegment,"kerUnhandledXmpdatum",Exiv2::kerUnhandledXmpdatum,"kerUnhandledXmpNode",Exiv2::kerUnhandledXmpNode,"kerXMPToolkitError",Exiv2::kerXMPToolkitError,"kerDecodeLangAltPropertyFailed",Exiv2::kerDecodeLangAltPropertyFailed,"kerDecodeLangAltQualifierFailed",Exiv2::kerDecodeLangAltQualifierFailed,"kerEncodeLangAltPropertyFailed",Exiv2::kerEncodeLangAltPropertyFailed,"kerPropertyNameIdentificationFailed",Exiv2::kerPropertyNameIdentificationFailed,"kerSchemaNamespaceNotRegistered",Exiv2::kerSchemaNamespaceNotRegistered,"kerNoNamespaceForPrefix",Exiv2::kerNoNamespaceForPrefix,"kerAliasesNotSupported",Exiv2::kerAliasesNotSupported,"kerInvalidXmpText",Exiv2::kerInvalidXmpText,"kerTooManyTiffDirectoryEntries",Exiv2::kerTooManyTiffDirectoryEntries,"kerMultipleTiffArrayElementTagsInDirectory",Exiv2::kerMultipleTiffArrayElementTagsInDirectory,"kerWrongTiffArrayElementTagType",Exiv2::kerWrongTiffArrayElementTagType,"kerInvalidKeyXmpValue",Exiv2::kerInvalidKeyXmpValue,"kerInvalidIccProfile",Exiv2::kerInvalidIccProfile,"kerInvalidXMP",Exiv2::kerInvalidXMP,"kerTiffDirectoryTooLarge",Exiv2::kerTiffDirectoryTooLarge,"kerInvalidTypeValue",Exiv2::kerInvalidTypeValue,"kerInvalidMalloc",Exiv2::kerInvalidMalloc,"kerCorruptedMetadata",Exiv2::kerCorruptedMetadata,"kerArithmeticOverflow",Exiv2::kerArithmeticOverflow,"kerMallocFailed",Exiv2::kerMallocFailed, NULL))); /* type 'Exiv2::LogMsg' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__LogMsg_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "pythonHandler",SWIG_NewFunctionPtrObj( (void*)log_to_python, SWIGTYPE_p_f_int_p_q_const__char__void)); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "defaultHandler",SWIG_NewFunctionPtrObj( @@ -5225,22 +5415,20 @@ SWIG_init(void) { "Level", "Defined log levels.\n" "\nTo suppress all log messages, either set the log level to mute or set" "\nthe log message handler to None.", _get_enum_list(0, "debug",Exiv2::LogMsg::debug,"info",Exiv2::LogMsg::info,"warn",Exiv2::LogMsg::warn,"error",Exiv2::LogMsg::error,"mute",Exiv2::LogMsg::mute, NULL))); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'LogMsg'."); + builtin_pytype = SwigPyBuiltin__Exiv2__LogMsg_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__LogMsg_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "LogMsg", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "LogMsg"); d = md; diff --git a/src/swig-0_27_7/exif.py b/src/swig-0_27_7/exif.py index 20b8ef40..3328ff7e 100644 --- a/src/swig-0_27_7/exif.py +++ b/src/swig-0_27_7/exif.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_27_7/exif_wrap.cxx b/src/swig-0_27_7/exif_wrap.cxx index 5e93c161..1c0172e1 100644 --- a/src/swig-0_27_7/exif_wrap.cxx +++ b/src/swig-0_27_7/exif_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_exif" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -4012,7 +4064,6 @@ static swig_module_info swig_module = {swig_types, 58, 0, 0, 0, 0}; # define SWIG_init init_exif #endif -#define SWIG_name "_exif" #ifdef __cplusplus #include @@ -4082,7 +4133,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4090,7 +4141,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4098,8 +4149,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4108,7 +4159,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4131,7 +4182,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4145,11 +4196,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4306,7 +4355,7 @@ static void _set_python_exception() { - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4442,7 +4491,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -4465,10 +4514,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -4503,12 +4552,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -5185,7 +5230,7 @@ SwigPython_std_pair_repr (PyObject *o) PyTuple_SET_ITEM(tuple, 0, PyObject_GetAttrString(o, (char*) "first")); PyTuple_SET_ITEM(tuple, 1, PyObject_GetAttrString(o, (char*) "second")); PyObject *result = PyObject_Repr(tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -5561,7 +5606,7 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_base___eq__(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData_iterator_base___eq__" "', argument " "2"" of type '" "ExifData_iterator_base const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData_iterator_base___eq__" "', argument " "2"" of type '" "ExifData_iterator_base const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData_iterator_base___eq__" "', argument " "2"" of type '" "ExifData_iterator_base const &""'"); } arg2 = reinterpret_cast< ExifData_iterator_base * >(argp2); result = (bool)((ExifData_iterator_base const *)arg1)->operator ==((ExifData_iterator_base const &)*arg2); @@ -5572,7 +5617,7 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_base___eq__(PyObject *self, PyObjec return NULL; } PyErr_Clear(); - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } @@ -5599,7 +5644,7 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_base___ne__(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData_iterator_base___ne__" "', argument " "2"" of type '" "ExifData_iterator_base const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData_iterator_base___ne__" "', argument " "2"" of type '" "ExifData_iterator_base const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData_iterator_base___ne__" "', argument " "2"" of type '" "ExifData_iterator_base const &""'"); } arg2 = reinterpret_cast< ExifData_iterator_base * >(argp2); result = (bool)((ExifData_iterator_base const *)arg1)->operator !=((ExifData_iterator_base const &)*arg2); @@ -5610,7 +5655,7 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_base___ne__(PyObject *self, PyObjec return NULL; } PyErr_Clear(); - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } @@ -5797,7 +5842,7 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_setValue__SWIG_1(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData_iterator_setValue" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData_iterator_setValue" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData_iterator_setValue" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -7102,7 +7147,7 @@ SWIGINTERN int _wrap_new_Exifdatum__SWIG_0(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Exifdatum" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Exifdatum" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_Exifdatum" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifKey * >(argp1); res2 = SWIG_ConvertPtr(obj2, &argp2,SWIGTYPE_p_Exiv2__Value, 0 | 0 ); @@ -7141,7 +7186,7 @@ SWIGINTERN int _wrap_new_Exifdatum__SWIG_1(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Exifdatum" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Exifdatum" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_Exifdatum" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifKey * >(argp1); { @@ -7175,7 +7220,7 @@ SWIGINTERN int _wrap_new_Exifdatum__SWIG_2(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Exifdatum" "', argument " "1"" of type '" "Exiv2::Exifdatum const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Exifdatum" "', argument " "1"" of type '" "Exiv2::Exifdatum const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_Exifdatum" "', argument " "1"" of type '" "Exiv2::Exifdatum const &""'"); } arg1 = reinterpret_cast< Exiv2::Exifdatum * >(argp1); { @@ -7328,7 +7373,7 @@ SWIGINTERN PyObject *_wrap_Exifdatum_setValue__SWIG_1(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Exifdatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Exifdatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Exifdatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -8586,7 +8631,7 @@ SWIGINTERN int _wrap_new_ExifThumbC(PyObject *self, PyObject *args, PyObject *kw SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ExifThumbC" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ExifThumbC" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_ExifThumbC" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); { @@ -8660,7 +8705,7 @@ SWIGINTERN PyObject *_wrap_ExifThumbC_writeFile(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifThumbC_writeFile" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifThumbC_writeFile" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifThumbC_writeFile" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -8798,7 +8843,7 @@ SWIGINTERN int _wrap_new_ExifThumb(PyObject *self, PyObject *args, PyObject *kwa SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ExifThumb" "', argument " "1"" of type '" "Exiv2::ExifData &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ExifThumb" "', argument " "1"" of type '" "Exiv2::ExifData &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_ExifThumb" "', argument " "1"" of type '" "Exiv2::ExifData &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); { @@ -8853,7 +8898,7 @@ SWIGINTERN PyObject *_wrap_ExifThumb_setJpegThumbnail__SWIG_0(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifThumb_setJpegThumbnail" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifThumb_setJpegThumbnail" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifThumb_setJpegThumbnail" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -8892,7 +8937,7 @@ SWIGINTERN PyObject *_wrap_ExifThumb_setJpegThumbnail__SWIG_0(PyObject *self, Py { try { #ifdef _EXV_ENABLE_FILESYSTEM - (arg1)->setJpegThumbnail((std::string const &)*arg2,arg3,arg4,arg5); + (arg1)->setJpegThumbnail((std::string const &)*arg2,SWIG_STD_MOVE(arg3),SWIG_STD_MOVE(arg4),arg5); #else throw Exiv2::Error(Exiv2::ErrorCode::kerFunctionNotSupported); #endif @@ -8971,7 +9016,7 @@ SWIGINTERN PyObject *_wrap_ExifThumb_setJpegThumbnail__SWIG_1(PyObject *self, Py arg6 = static_cast< uint16_t >(val6); { try { - (arg1)->setJpegThumbnail((Exiv2::byte const *)arg2,arg3,arg4,arg5,arg6); + (arg1)->setJpegThumbnail((Exiv2::byte const *)arg2,arg3,SWIG_STD_MOVE(arg4),SWIG_STD_MOVE(arg5),arg6); } catch(std::exception const& e) { _set_python_exception(); @@ -9013,7 +9058,7 @@ SWIGINTERN PyObject *_wrap_ExifThumb_setJpegThumbnail__SWIG_2(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifThumb_setJpegThumbnail" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifThumb_setJpegThumbnail" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifThumb_setJpegThumbnail" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9241,7 +9286,7 @@ SWIGINTERN PyObject *_wrap_ExifData_add__SWIG_0(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData_add" "', argument " "2"" of type '" "Exiv2::ExifKey const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData_add" "', argument " "2"" of type '" "Exiv2::ExifKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData_add" "', argument " "2"" of type '" "Exiv2::ExifKey const &""'"); } arg2 = reinterpret_cast< Exiv2::ExifKey * >(argp2); res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__Value, 0 | 0 ); @@ -9286,7 +9331,7 @@ SWIGINTERN PyObject *_wrap_ExifData_add__SWIG_1(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData_add" "', argument " "2"" of type '" "Exiv2::Exifdatum const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData_add" "', argument " "2"" of type '" "Exiv2::Exifdatum const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData_add" "', argument " "2"" of type '" "Exiv2::Exifdatum const &""'"); } arg2 = reinterpret_cast< Exiv2::Exifdatum * >(argp2); { @@ -9364,13 +9409,13 @@ SWIGINTERN PyObject *_wrap_ExifData_erase__SWIG_0(PyObject *self, PyObject *args ; } if (!argp) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData_erase" "', argument " "2"" of type '" "ExifData_iterator_base""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData_erase" "', argument " "2"" of type '" "ExifData_iterator_base""'"); } arg2 = **argp; } { try { - result = (arg1)->erase(arg2); + result = (arg1)->erase(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -9422,7 +9467,7 @@ SWIGINTERN PyObject *_wrap_ExifData_erase__SWIG_1(PyObject *self, PyObject *args ; } if (!argp) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData_erase" "', argument " "2"" of type '" "ExifData_iterator_base""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData_erase" "', argument " "2"" of type '" "ExifData_iterator_base""'"); } arg2 = **argp; } @@ -9435,13 +9480,13 @@ SWIGINTERN PyObject *_wrap_ExifData_erase__SWIG_1(PyObject *self, PyObject *args ; } if (!argp) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData_erase" "', argument " "3"" of type '" "ExifData_iterator_base""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData_erase" "', argument " "3"" of type '" "ExifData_iterator_base""'"); } arg3 = **argp; } { try { - result = (arg1)->erase(arg2,arg3); + result = (arg1)->erase(SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); } catch(std::exception const& e) { _set_python_exception(); @@ -9666,7 +9711,7 @@ SWIGINTERN PyObject *_wrap_ExifData_findKey(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData_findKey" "', argument " "2"" of type '" "Exiv2::ExifKey const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData_findKey" "', argument " "2"" of type '" "Exiv2::ExifKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData_findKey" "', argument " "2"" of type '" "Exiv2::ExifKey const &""'"); } arg2 = reinterpret_cast< Exiv2::ExifKey * >(argp2); { @@ -9762,7 +9807,7 @@ SWIGINTERN PyObject *_wrap_ExifData___getitem__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData___getitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData___getitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData___getitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9817,7 +9862,7 @@ SWIGINTERN PyObject *_wrap_ExifData___setitem____SWIG_0(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9870,7 +9915,7 @@ SWIGINTERN PyObject *_wrap_ExifData___setitem____SWIG_1(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9881,7 +9926,7 @@ SWIGINTERN PyObject *_wrap_ExifData___setitem____SWIG_1(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ExifData___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -9930,7 +9975,7 @@ SWIGINTERN PyObject *_wrap_ExifData___setitem____SWIG_2(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9976,7 +10021,7 @@ SWIGINTERN PyObject *_wrap_ExifData___setitem____SWIG_3(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -10081,7 +10126,7 @@ SWIGINTERN PyObject *_wrap_ExifData___contains__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData___contains__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData___contains__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData___contains__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -10181,7 +10226,7 @@ SwigPyBuiltin__ExifData_iterator_base_richcompare(PyObject *self, PyObject *othe PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); switch (op) { case Py_EQ : result = _wrap_ExifData_iterator_base___eq__(self, tuple); break; case Py_NE : result = _wrap_ExifData_iterator_base___ne__(self, tuple); break; @@ -10192,10 +10237,10 @@ SwigPyBuiltin__ExifData_iterator_base_richcompare(PyObject *self, PyObject *othe result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -10208,42 +10253,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__ExifData_iterator_base_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__ExifData_iterator_base_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.exif.ExifData_iterator_base", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_ExifData_iterator_base_destructor_closure, /* tp_dealloc */ + "exiv2.exif.ExifData_iterator_base", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_ExifData_iterator_base_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__ExifData_iterator_base_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__ExifData_iterator_base_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__ExifData_iterator_base_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - _wrap_ExifData_iterator_base___str___reprfunc_closure, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__ExifData_iterator_base_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__ExifData_iterator_base_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__ExifData_iterator_base_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__ExifData_iterator_base_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + _wrap_ExifData_iterator_base___str___reprfunc_closure, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__ExifData_iterator_base_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -10251,176 +10297,295 @@ static PyHeapTypeObject SwigPyBuiltin__ExifData_iterator_base_type = { "\n" "Python wrapper for an :class:`ExifData` iterator that points to\n" "the 'end' value and can not be dereferenced.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__ExifData_iterator_base_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_ExifData_iterator_base___iter___getiterfunc_closure, /* tp_iter */ - _wrap_ExifData_iterator_base___next___iternextfunc_closure, /* tp_iternext */ - SwigPyBuiltin__ExifData_iterator_base_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__ExifData_iterator_base_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__ExifData_iterator_base_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_ExifData_iterator_base___iter___getiterfunc_closure, /* tp_iter */ + _wrap_ExifData_iterator_base___next___iternextfunc_closure, /* tp_iternext */ + SwigPyBuiltin__ExifData_iterator_base_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__ExifData_iterator_base_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__ExifData_iterator_base_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__ExifData_iterator_base_type}; +static PyTypeObject *SwigPyBuiltin__ExifData_iterator_base_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__ExifData_iterator_base_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifData_iterator_base'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__ExifData_iterator_base_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete_ExifData_iterator_base_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "\n" + "Python wrapper for an :class:`ExifData` iterator that points to\n" + "the 'end' value and can not be dereferenced.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)_wrap_ExifData_iterator_base___str___reprfunc_closure }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__ExifData_iterator_base_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__ExifData_iterator_base_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__ExifData_iterator_base_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)_wrap_ExifData_iterator_base___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)_wrap_ExifData_iterator_base___next___iternextfunc_closure }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.exif.ExifData_iterator_base", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__ExifData_iterator_base_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet ExifData_iterator___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__ExifData_iterator_getset[] = { @@ -10434,7 +10599,7 @@ SwigPyBuiltin__ExifData_iterator_richcompare(PyObject *self, PyObject *other, in PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); switch (op) { case Py_EQ : result = _wrap_ExifData_iterator_base___eq__(self, tuple); break; case Py_NE : result = _wrap_ExifData_iterator_base___ne__(self, tuple); break; @@ -10445,10 +10610,10 @@ SwigPyBuiltin__ExifData_iterator_richcompare(PyObject *self, PyObject *other, in result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -10471,14 +10636,14 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__ExifData_iterator_methods[] = { ":return: Return -1 if the %Exifdatum does not have a value yet or the\n" " value has no data area, else 0.\n" "" }, - { "key", _wrap_ExifData_iterator_key, METH_VARARGS, " Return the key of the %Exifdatum." }, + { "key", _wrap_ExifData_iterator_key, METH_VARARGS, "Return the key of the %Exifdatum." }, { "familyName", _wrap_ExifData_iterator_familyName, METH_VARARGS, "" }, { "groupName", _wrap_ExifData_iterator_groupName, METH_VARARGS, "" }, { "tagName", _wrap_ExifData_iterator_tagName, METH_VARARGS, "" }, { "tagLabel", _wrap_ExifData_iterator_tagLabel, METH_VARARGS, "" }, { "tag", _wrap_ExifData_iterator_tag, METH_VARARGS, "" }, - { "ifdName", _wrap_ExifData_iterator_ifdName, METH_VARARGS, " Return the name of the IFD" }, - { "idx", _wrap_ExifData_iterator_idx, METH_VARARGS, " Return the index (unique id of this key within the original IFD)" }, + { "ifdName", _wrap_ExifData_iterator_ifdName, METH_VARARGS, "Return the name of the IFD" }, + { "idx", _wrap_ExifData_iterator_idx, METH_VARARGS, "Return the index (unique id of this key within the original IFD)" }, { "copy", _wrap_ExifData_iterator_copy, METH_VARARGS, "\n" "Write value to a data buffer and return the number\n" " of bytes written.\n" @@ -10494,18 +10659,18 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__ExifData_iterator_methods[] = { ":return: Number of characters written.\n" "" }, { "write", _wrap_ExifData_iterator_write, METH_VARARGS, "" }, - { "typeId", _wrap_ExifData_iterator_typeId, METH_VARARGS, " Return the type id of the value" }, - { "typeName", _wrap_ExifData_iterator_typeName, METH_VARARGS, " Return the name of the type" }, - { "typeSize", _wrap_ExifData_iterator_typeSize, METH_VARARGS, " Return the size in bytes of one component of this type" }, - { "count", _wrap_ExifData_iterator_count, METH_VARARGS, " Return the number of components in the value" }, - { "size", _wrap_ExifData_iterator_size, METH_VARARGS, " Return the size of the value in bytes" }, - { "toString", _wrap_ExifData_iterator_toString, METH_VARARGS, " Return the value as a string." }, + { "typeId", _wrap_ExifData_iterator_typeId, METH_VARARGS, "Return the type id of the value" }, + { "typeName", _wrap_ExifData_iterator_typeName, METH_VARARGS, "Return the name of the type" }, + { "typeSize", _wrap_ExifData_iterator_typeSize, METH_VARARGS, "Return the size in bytes of one component of this type" }, + { "count", _wrap_ExifData_iterator_count, METH_VARARGS, "Return the number of components in the value" }, + { "size", _wrap_ExifData_iterator_size, METH_VARARGS, "Return the size of the value in bytes" }, + { "toString", _wrap_ExifData_iterator_toString, METH_VARARGS, "Return the value as a string." }, { "toLong", _wrap_ExifData_iterator_toLong, METH_VARARGS, "" }, { "toFloat", _wrap_ExifData_iterator_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_ExifData_iterator_toRational, METH_VARARGS, "" }, { "getValue", _wrap_ExifData_iterator_getValue, METH_VARARGS, "" }, { "value", _wrap_ExifData_iterator_value, METH_VARARGS, "" }, - { "sizeDataArea", _wrap_ExifData_iterator_sizeDataArea, METH_VARARGS, " Return the size of the data area." }, + { "sizeDataArea", _wrap_ExifData_iterator_sizeDataArea, METH_VARARGS, "Return the size of the data area." }, { "dataArea", _wrap_ExifData_iterator_dataArea, METH_VARARGS, "\n" "Return a copy of the data area of the value. The caller owns\n" " this copy and %DataBuf ensures that it will be deleted.\n" @@ -10528,42 +10693,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__ExifData_iterator_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__ExifData_iterator_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.exif.ExifData_iterator", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_ExifData_iterator_destructor_closure, /* tp_dealloc */ + "exiv2.exif.ExifData_iterator", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_ExifData_iterator_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__ExifData_iterator_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__ExifData_iterator_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__ExifData_iterator_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__ExifData_iterator_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__ExifData_iterator_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__ExifData_iterator_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__ExifData_iterator_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__ExifData_iterator_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -10572,176 +10738,296 @@ static PyHeapTypeObject SwigPyBuiltin__ExifData_iterator_type = { "Python wrapper for an :class:`ExifData` iterator. It has most of\n" "the methods of :class:`Exifdatum` allowing easy access to the\n" "data it points to.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__ExifData_iterator_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__ExifData_iterator_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ SwigPyBuiltin__ExifData_iterator_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__ExifData_iterator_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + 0, /* tp_members */ + SwigPyBuiltin__ExifData_iterator_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__ExifData_iterator_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__ExifData_iterator_type}; +static PyTypeObject *SwigPyBuiltin__ExifData_iterator_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__ExifData_iterator_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifData_iterator'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__ExifData_iterator_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete_ExifData_iterator_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "\n" + "Python wrapper for an :class:`ExifData` iterator. It has most of\n" + "the methods of :class:`Exifdatum` allowing easy access to the\n" + "data it points to.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__ExifData_iterator_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__ExifData_iterator_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__ExifData_iterator_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.exif.ExifData_iterator", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__ExifData_iterator_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet Exifdatum___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__Exifdatum_getset[] = { @@ -10774,16 +11060,16 @@ SwigPyBuiltin__Exiv2__Exifdatum_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -10805,14 +11091,14 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Exifdatum_methods[] = { ":return: Return -1 if the %Exifdatum does not have a value yet or the\n" " value has no data area, else 0.\n" "" }, - { "key", _wrap_Exifdatum_key, METH_VARARGS, " Return the key of the %Exifdatum." }, + { "key", _wrap_Exifdatum_key, METH_VARARGS, "Return the key of the %Exifdatum." }, { "familyName", _wrap_Exifdatum_familyName, METH_VARARGS, "" }, { "groupName", _wrap_Exifdatum_groupName, METH_VARARGS, "" }, { "tagName", _wrap_Exifdatum_tagName, METH_VARARGS, "" }, { "tagLabel", _wrap_Exifdatum_tagLabel, METH_VARARGS, "" }, { "tag", _wrap_Exifdatum_tag, METH_VARARGS, "" }, - { "ifdName", _wrap_Exifdatum_ifdName, METH_VARARGS, " Return the name of the IFD" }, - { "idx", _wrap_Exifdatum_idx, METH_VARARGS, " Return the index (unique id of this key within the original IFD)" }, + { "ifdName", _wrap_Exifdatum_ifdName, METH_VARARGS, "Return the name of the IFD" }, + { "idx", _wrap_Exifdatum_idx, METH_VARARGS, "Return the index (unique id of this key within the original IFD)" }, { "copy", _wrap_Exifdatum_copy, METH_VARARGS, "\n" "Write value to a data buffer and return the number\n" " of bytes written.\n" @@ -10828,18 +11114,18 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Exifdatum_methods[] = { ":return: Number of characters written.\n" "" }, { "write", _wrap_Exifdatum_write, METH_VARARGS, "" }, - { "typeId", _wrap_Exifdatum_typeId, METH_VARARGS, " Return the type id of the value" }, - { "typeName", _wrap_Exifdatum_typeName, METH_VARARGS, " Return the name of the type" }, - { "typeSize", _wrap_Exifdatum_typeSize, METH_VARARGS, " Return the size in bytes of one component of this type" }, - { "count", _wrap_Exifdatum_count, METH_VARARGS, " Return the number of components in the value" }, - { "size", _wrap_Exifdatum_size, METH_VARARGS, " Return the size of the value in bytes" }, - { "toString", _wrap_Exifdatum_toString, METH_VARARGS, " Return the value as a string." }, + { "typeId", _wrap_Exifdatum_typeId, METH_VARARGS, "Return the type id of the value" }, + { "typeName", _wrap_Exifdatum_typeName, METH_VARARGS, "Return the name of the type" }, + { "typeSize", _wrap_Exifdatum_typeSize, METH_VARARGS, "Return the size in bytes of one component of this type" }, + { "count", _wrap_Exifdatum_count, METH_VARARGS, "Return the number of components in the value" }, + { "size", _wrap_Exifdatum_size, METH_VARARGS, "Return the size of the value in bytes" }, + { "toString", _wrap_Exifdatum_toString, METH_VARARGS, "Return the value as a string." }, { "toLong", _wrap_Exifdatum_toLong, METH_VARARGS, "" }, { "toFloat", _wrap_Exifdatum_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_Exifdatum_toRational, METH_VARARGS, "" }, { "getValue", _wrap_Exifdatum_getValue, METH_VARARGS, "" }, { "value", _wrap_Exifdatum_value, METH_VARARGS, "" }, - { "sizeDataArea", _wrap_Exifdatum_sizeDataArea, METH_VARARGS, " Return the size of the data area." }, + { "sizeDataArea", _wrap_Exifdatum_sizeDataArea, METH_VARARGS, "Return the size of the data area." }, { "dataArea", _wrap_Exifdatum_dataArea, METH_VARARGS, "\n" "Return a copy of the data area of the value. The caller owns\n" " this copy and %DataBuf ensures that it will be deleted.\n" @@ -10857,222 +11143,341 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Exifdatum_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__Exifdatum_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.exif.Exifdatum", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_Exifdatum_destructor_closure,/* tp_dealloc */ + "exiv2.exif.Exifdatum", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_Exifdatum_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__Exifdatum_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__Exifdatum_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__Exifdatum_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__Exifdatum_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__Exifdatum_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__Exifdatum_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__Exifdatum_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__Exifdatum_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "An Exif metadatum, consisting of an ExifKey and a Value and\n" " methods to manipulate these.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__Exifdatum_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__Exifdatum_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__Exifdatum_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_Exifdatum, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__Exifdatum_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__Exifdatum_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__Exifdatum_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_Exifdatum, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Exifdatum_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__Exifdatum_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__Exifdatum_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Exifdatum_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Exifdatum'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__Exifdatum_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_Exifdatum }, + { Py_tp_dealloc, (void *)_wrap_delete_Exifdatum_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "An Exif metadatum, consisting of an ExifKey and a Value and\n" + " methods to manipulate these.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__Exifdatum_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__Exifdatum_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__Exifdatum_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.exif.Exifdatum", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Exifdatum_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet ExifThumbC___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ExifThumbC_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Constructor.", &ExifThumbC___dict___getset }, + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"Constructor.", &ExifThumbC___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -11082,16 +11487,16 @@ SwigPyBuiltin__Exiv2__ExifThumbC_richcompare(PyObject *self, PyObject *other, in PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -11123,42 +11528,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ExifThumbC_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ExifThumbC_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.exif.ExifThumbC", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_ExifThumbC_destructor_closure, /* tp_dealloc */ + "exiv2.exif.ExifThumbC", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_ExifThumbC_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ExifThumbC_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__ExifThumbC_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ExifThumbC_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ExifThumbC_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ExifThumbC_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ExifThumbC_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__ExifThumbC_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ExifThumbC_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -11172,180 +11578,305 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__ExifThumbC_type = { " image, depending on its format and the camera make and model. This\n" " class only provides access to the Exif thumbnail as specified in the\n" " Exif standard.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ExifThumbC_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ExifThumbC_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ SwigPyBuiltin__Exiv2__ExifThumbC_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ExifThumbC_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_ExifThumbC, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ExifThumbC_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_ExifThumbC, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ExifThumbC_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifThumbC_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ExifThumbC_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifThumbC_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifThumbC'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ExifThumbC_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_ExifThumbC }, + { Py_tp_dealloc, (void *)_wrap_delete_ExifThumbC_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Access to a Exif %thumbnail image. This class provides higher level\n" + " accessors to the thumbnail image that is optionally embedded in IFD1\n" + " of the Exif data. These methods do not write to the Exif metadata.\n" + " Manipulators are provided in subclass ExifThumb.\n" + "\n" + "Notes: Various other preview and thumbnail images may be contained in an\n" + " image, depending on its format and the camera make and model. This\n" + " class only provides access to the Exif thumbnail as specified in the\n" + " Exif standard.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ExifThumbC_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ExifThumbC_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ExifThumbC_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.exif.ExifThumbC", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ExifThumbC_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet ExifThumb___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ExifThumb_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Constructor.", &ExifThumb___dict___getset }, + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"Constructor.", &ExifThumb___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -11355,16 +11886,16 @@ SwigPyBuiltin__Exiv2__ExifThumb_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -11446,42 +11977,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ExifThumb_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ExifThumb_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.exif.ExifThumb", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_ExifThumb_destructor_closure,/* tp_dealloc */ + "exiv2.exif.ExifThumb", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_ExifThumb_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ExifThumb_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__ExifThumb_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ExifThumb_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ExifThumb_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ExifThumb_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ExifThumb_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__ExifThumb_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ExifThumb_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -11495,176 +12027,301 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__ExifThumb_type = { " image, depending on its format and the camera make and model. This\n" " class only provides access to the Exif thumbnail as specified in the\n" " Exif standard.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ExifThumb_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ExifThumb_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ExifThumb_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_ExifThumb, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ExifThumb_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ExifThumb_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ExifThumb_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_ExifThumb, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ExifThumb_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifThumb_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ExifThumb_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifThumb_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifThumb'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ExifThumb_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_ExifThumb }, + { Py_tp_dealloc, (void *)_wrap_delete_ExifThumb_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Access and modify an Exif %thumbnail image. This class implements\n" + " manipulators to set and erase the thumbnail image that is optionally\n" + " embedded in IFD1 of the Exif data. Accessors are provided by the\n" + " base class, ExifThumbC.\n" + "\n" + "Notes: Various other preview and thumbnail images may be contained in an\n" + " image, depending on its format and the camera make and model. This\n" + " class only provides access to the Exif thumbnail as specified in the\n" + " Exif standard.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ExifThumb_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ExifThumb_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ExifThumb_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.exif.ExifThumb", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ExifThumb_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet ExifData___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ExifData_getset[] = { @@ -11695,16 +12352,16 @@ SwigPyBuiltin__Exiv2__ExifData_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -11747,58 +12404,59 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ExifData_methods[] = { "Delete all Exifdatum instances resulting in an empty container.\n" " Note that this also removes thumbnails.\n" "" }, - { "sortByKey", _wrap_ExifData_sortByKey, METH_VARARGS, " Sort metadata by key" }, - { "sortByTag", _wrap_ExifData_sortByTag, METH_VARARGS, " Sort metadata by tag" }, - { "begin", _wrap_ExifData_begin, METH_VARARGS, " Begin of the metadata" }, - { "end", _wrap_ExifData_end, METH_VARARGS, " End of the metadata" }, + { "sortByKey", _wrap_ExifData_sortByKey, METH_VARARGS, "Sort metadata by key" }, + { "sortByTag", _wrap_ExifData_sortByTag, METH_VARARGS, "Sort metadata by tag" }, + { "begin", _wrap_ExifData_begin, METH_VARARGS, "Begin of the metadata" }, + { "end", _wrap_ExifData_end, METH_VARARGS, "End of the metadata" }, { "findKey", _wrap_ExifData_findKey, METH_VARARGS, "\n" "Find the first Exifdatum with the given *key*, return an\n" " iterator to it.\n" "" }, - { "empty", _wrap_ExifData_empty, METH_VARARGS, " Return true if there is no Exif metadata" }, - { "count", _wrap_ExifData_count, METH_VARARGS, " Get the number of metadata entries" }, + { "empty", _wrap_ExifData_empty, METH_VARARGS, "Return true if there is no Exif metadata" }, + { "count", _wrap_ExifData_count, METH_VARARGS, "Get the number of metadata entries" }, { "__getitem__", _wrap_ExifData___getitem__, METH_VARARGS, "" }, { "__setitem__", _wrap_ExifData___setitem__, METH_VARARGS, "" }, { "__contains__", _wrap_ExifData___contains__, METH_VARARGS, "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ExifData_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.exif.ExifData", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ + "exiv2.exif.ExifData", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ _wrap_delete_ExifData_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ExifData_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__ExifData_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ExifData_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ExifData_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ExifData_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ExifData_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__ExifData_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ExifData_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -11813,176 +12471,302 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__ExifData_type = { "- write Exif data to JPEG files\n" "- extract Exif metadata to files, insert from these files\n" "- extract and delete Exif thumbnail (JPEG and TIFF thumbnails)\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ExifData_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ExifData_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ _wrap_ExifData_begin_getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ExifData_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ExifData_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_ExifData, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ExifData_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ExifData_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_ExifData, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - _wrap_ExifData_count_lenfunc_closure, /* mp_length */ - _wrap_ExifData___getitem___binaryfunc_closure, /* mp_subscript */ - _wrap_ExifData___setitem___objobjargproc_closure, /* mp_ass_subscript */ + _wrap_ExifData_count_lenfunc_closure, /* mp_length */ + _wrap_ExifData___getitem___binaryfunc_closure, /* mp_subscript */ + _wrap_ExifData___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - _wrap_ExifData___contains___objobjproc_closure, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + _wrap_ExifData___contains___objobjproc_closure, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ExifData_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifData_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ExifData_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifData_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifData'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ExifData_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_ExifData }, + { Py_tp_dealloc, (void *)_wrap_delete_ExifData_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "A container for Exif data. This is a top-level class of the %Exiv2\n" + " library. The container holds Exifdatum objects.\n" + "\n" + "Provide high-level access to the Exif data of an image:\n" + "- read Exif information from JPEG files\n" + "- access metadata through keys and standard C++ iterators\n" + "- add, modify and delete metadata\n" + "- write Exif data to JPEG files\n" + "- extract Exif metadata to files, insert from these files\n" + "- extract and delete Exif thumbnail (JPEG and TIFF thumbnails)\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ExifData_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ExifData_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ExifData_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)_wrap_ExifData_count_lenfunc_closure }, + { Py_mp_subscript, (void *)_wrap_ExifData___getitem___binaryfunc_closure }, + { Py_mp_ass_subscript, (void *)_wrap_ExifData___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_ExifData_begin_getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)_wrap_ExifData___contains___objobjproc_closure }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.exif.ExifData", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ExifData_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -12588,7 +13372,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -12771,7 +13555,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -12797,31 +13581,27 @@ SWIG_init(void) { /* type '::ExifData_iterator_base' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__ExifData_iterator_base_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifData_iterator_base'."); + builtin_pytype = SwigPyBuiltin__ExifData_iterator_base_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__ExifData_iterator_base_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "ExifData_iterator_base", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "ExifData_iterator_base"); d = md; /* type '::ExifData_iterator' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__ExifData_iterator_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); { PyObject* module = PyImport_ImportModule("enum"); @@ -12833,8 +13613,6 @@ SWIG_init(void) { return NULL; } - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_ExifData_iterator_base"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -12848,27 +13626,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifData_iterator'."); + builtin_pytype = SwigPyBuiltin__ExifData_iterator_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__ExifData_iterator_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "ExifData_iterator", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "ExifData_iterator"); d = md; /* type 'Exiv2::Exifdatum' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Exifdatum_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Metadatum"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -12882,50 +13657,44 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'Exifdatum'."); + builtin_pytype = SwigPyBuiltin__Exiv2__Exifdatum_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__Exifdatum_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "Exifdatum", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "Exifdatum"); d = md; /* type 'Exiv2::ExifThumbC' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifThumbC_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifThumbC'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ExifThumbC_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ExifThumbC_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "ExifThumbC", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "ExifThumbC"); d = md; /* type 'Exiv2::ExifThumb' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifThumb_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__ExifThumbC"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -12939,41 +13708,38 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifThumb'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ExifThumb_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ExifThumb_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "ExifThumb", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "ExifThumb"); d = md; /* type 'Exiv2::ExifData' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifData_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifData'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ExifData_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ExifData_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "ExifData", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "ExifData"); d = md; diff --git a/src/swig-0_27_7/image.py b/src/swig-0_27_7/image.py index f4200d26..0bf1ec2b 100644 --- a/src/swig-0_27_7/image.py +++ b/src/swig-0_27_7/image.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_27_7/image_wrap.cxx b/src/swig-0_27_7/image_wrap.cxx index ad8f2f63..fb8d099b 100644 --- a/src/swig-0_27_7/image_wrap.cxx +++ b/src/swig-0_27_7/image_wrap.cxx @@ -1,19 +1,20 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_THREADS #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_image" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -148,6 +149,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -201,11 +206,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -824,10 +842,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -846,10 +860,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -870,10 +885,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -903,6 +914,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -944,6 +968,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -965,14 +992,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1002,7 +1029,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1187,7 +1214,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1208,13 +1235,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1224,7 +1251,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1232,11 +1259,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1245,12 +1272,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1374,21 +1401,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1453,7 +1480,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1469,9 +1496,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1504,9 +1531,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1607,7 +1637,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1650,27 +1680,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1694,10 +1724,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1725,7 +1755,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1754,10 +1784,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1784,14 +1814,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1821,7 +1851,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1860,15 +1890,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1912,7 +1945,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1923,7 +1956,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1931,13 +1964,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1950,7 +1983,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1959,7 +1992,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1993,9 +2026,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2016,7 +2049,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2076,9 +2109,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2134,9 +2167,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2166,7 +2202,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2189,7 +2225,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2247,16 +2283,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2270,13 +2309,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2292,9 +2331,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2350,9 +2389,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2399,7 +2441,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2452,7 +2494,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2479,7 +2526,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2489,7 +2536,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2615,7 +2662,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2653,8 +2700,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2714,13 +2761,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2737,24 +2784,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2791,7 +2838,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2855,7 +2902,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2924,11 +2971,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2948,10 +2995,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2971,11 +3018,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2999,15 +3046,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3039,6 +3086,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3065,8 +3113,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3110,7 +3158,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3125,20 +3173,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3211,7 +3259,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3243,11 +3291,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3265,15 +3313,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3423,6 +3471,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3514,6 +3565,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3537,19 +3591,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3559,23 +3613,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3613,7 +3665,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3622,15 +3674,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3645,7 +3697,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3669,10 +3721,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3688,14 +3740,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3721,7 +3773,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3738,7 +3790,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3756,13 +3808,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3778,7 +3830,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3792,7 +3844,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3809,13 +3861,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3831,12 +3883,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3851,7 +3903,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3866,16 +3918,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3902,7 +3954,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -4028,7 +4080,6 @@ static swig_module_info swig_module = {swig_types, 73, 0, 0, 0, 0}; # define SWIG_init init_image #endif -#define SWIG_name "_image" #ifdef __cplusplus #include @@ -4098,7 +4149,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4106,7 +4157,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4114,8 +4165,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4124,7 +4175,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4147,7 +4198,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4161,11 +4212,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4319,7 +4368,7 @@ static void _set_python_exception() { - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4625,7 +4674,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -4648,10 +4697,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -4686,12 +4735,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -5114,7 +5159,7 @@ SWIGINTERN PyObject *_wrap_Image_setExifData(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Image_setExifData" "', argument " "2"" of type '" "Exiv2::ExifData const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Image_setExifData" "', argument " "2"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Image_setExifData" "', argument " "2"" of type '" "Exiv2::ExifData const &""'"); } arg2 = reinterpret_cast< Exiv2::ExifData * >(argp2); { @@ -5183,7 +5228,7 @@ SWIGINTERN PyObject *_wrap_Image_setIptcData(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Image_setIptcData" "', argument " "2"" of type '" "Exiv2::IptcData const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Image_setIptcData" "', argument " "2"" of type '" "Exiv2::IptcData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Image_setIptcData" "', argument " "2"" of type '" "Exiv2::IptcData const &""'"); } arg2 = reinterpret_cast< Exiv2::IptcData * >(argp2); { @@ -5253,7 +5298,7 @@ SWIGINTERN PyObject *_wrap_Image_setXmpPacket(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Image_setXmpPacket" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Image_setXmpPacket" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Image_setXmpPacket" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -5325,7 +5370,7 @@ SWIGINTERN PyObject *_wrap_Image_setXmpData(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Image_setXmpData" "', argument " "2"" of type '" "Exiv2::XmpData const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Image_setXmpData" "', argument " "2"" of type '" "Exiv2::XmpData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Image_setXmpData" "', argument " "2"" of type '" "Exiv2::XmpData const &""'"); } arg2 = reinterpret_cast< Exiv2::XmpData * >(argp2); { @@ -5395,7 +5440,7 @@ SWIGINTERN PyObject *_wrap_Image_setComment(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Image_setComment" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Image_setComment" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Image_setComment" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -5472,7 +5517,7 @@ SWIGINTERN PyObject *_wrap_Image_setIccProfile(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Image_setIccProfile" "', argument " "2"" of type '" "Exiv2::DataBuf &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Image_setIccProfile" "', argument " "2"" of type '" "Exiv2::DataBuf &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Image_setIccProfile" "', argument " "2"" of type '" "Exiv2::DataBuf &""'"); } arg2 = reinterpret_cast< Exiv2::DataBuf * >(argp2); if (swig_obj[1]) { @@ -5612,7 +5657,7 @@ SWIGINTERN PyObject *_wrap_Image_setMetadata(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Image_setMetadata" "', argument " "2"" of type '" "Exiv2::Image const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Image_setMetadata" "', argument " "2"" of type '" "Exiv2::Image const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Image_setMetadata" "', argument " "2"" of type '" "Exiv2::Image const &""'"); } arg2 = reinterpret_cast< Exiv2::Image * >(argp2); { @@ -6344,7 +6389,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_createIo__SWIG_0(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageFactory_createIo" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageFactory_createIo" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ImageFactory_createIo" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -6404,7 +6449,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_open__SWIG_0(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageFactory_open" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageFactory_open" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ImageFactory_open" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -6563,7 +6608,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_create__SWIG_0(PyObject *self, Py_ssize_ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ImageFactory_create" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageFactory_create" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ImageFactory_create" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -6684,7 +6729,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_getType__SWIG_0(PyObject *self, Py_ssize SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageFactory_getType" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageFactory_getType" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ImageFactory_getType" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -6777,7 +6822,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_getType__SWIG_2(PyObject *self, Py_ssize SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageFactory_getType" "', argument " "1"" of type '" "Exiv2::BasicIo &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageFactory_getType" "', argument " "1"" of type '" "Exiv2::BasicIo &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ImageFactory_getType" "', argument " "1"" of type '" "Exiv2::BasicIo &""'"); } arg1 = reinterpret_cast< Exiv2::BasicIo * >(argp1); { @@ -6933,7 +6978,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_checkType(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ImageFactory_checkType" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageFactory_checkType" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ImageFactory_checkType" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); } arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); @@ -7107,7 +7152,7 @@ SwigPyBuiltin__Exiv2__Image_richcompare(PyObject *self, PyObject *other, int op) result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -7235,7 +7280,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Image_methods[] = { "Erase iccProfile. the profile is not removed from\n" " the actual image until the writeMetadata() method is called.\n" "" }, - { "iccProfile", _wrap_Image_iccProfile, METH_NOARGS, " return iccProfile" }, + { "iccProfile", _wrap_Image_iccProfile, METH_NOARGS, "return iccProfile" }, { "setMetadata", _wrap_Image_setMetadata, METH_O, "\n" "Copy all existing metadata from source Image. The data is\n" " copied into internal buffers and is not written to the image\n" @@ -7283,7 +7328,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Image_methods[] = { ":rtype: :py:class:`XmpData`\n" ":return: modifiable XmpData instance containing XMP values\n" "" }, - { "xmpPacket", _wrap_Image_xmpPacket, METH_NOARGS, " Return a modifiable reference to the raw XMP packet." }, + { "xmpPacket", _wrap_Image_xmpPacket, METH_NOARGS, "Return a modifiable reference to the raw XMP packet." }, { "writeXmpFromPacket", _wrap_Image_writeXmpFromPacket, METH_VARARGS, "\n" "*Overload 1:*\n" "\n" @@ -7334,9 +7379,9 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Image_methods[] = { "and thus they all have MIME type \"image/tiff\", although a more\n" "specific MIME type may exist (e.g., \"image/x-nikon-nef\").\n" "" }, - { "pixelWidth", _wrap_Image_pixelWidth, METH_NOARGS, " Return the pixel width of the image." }, - { "pixelHeight", _wrap_Image_pixelHeight, METH_NOARGS, " Return the pixel height of the image." }, - { "comment", _wrap_Image_comment, METH_NOARGS, " Return a copy of the image comment. May be an empty string." }, + { "pixelWidth", _wrap_Image_pixelWidth, METH_NOARGS, "Return the pixel width of the image." }, + { "pixelHeight", _wrap_Image_pixelHeight, METH_NOARGS, "Return the pixel height of the image." }, + { "comment", _wrap_Image_comment, METH_NOARGS, "Return a copy of the image comment. May be an empty string." }, { "io", _wrap_Image_io, METH_NOARGS, "\n" "Return a reference to the BasicIo instance being used for Io.\n" "\n" @@ -7364,47 +7409,48 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Image_methods[] = { "Check if image supports a particular type of metadata.\n" " This method is deprecated. Use checkMode() instead.\n" "" }, - { "setTypeSupported", _wrap_Image_setTypeSupported, METH_VARARGS, " set type support for this image format" }, - { "imageType", _wrap_Image_imageType, METH_NOARGS, " set type support for this image format" }, + { "setTypeSupported", _wrap_Image_setTypeSupported, METH_VARARGS, "set type support for this image format" }, + { "imageType", _wrap_Image_imageType, METH_NOARGS, "set type support for this image format" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__Image_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.image.Image", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_Image_destructor_closure, /* tp_dealloc */ + "exiv2.image.Image", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_Image_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__Image_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__Image_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__Image_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__Image_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__Image_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__Image_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__Image_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__Image_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -7418,176 +7464,301 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__Image_type = { "Most client apps will obtain an Image instance by calling a static\n" "ImageFactory method. The Image class can then be used to to read, write,\n" "and save metadata.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__Image_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__Image_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__Image_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__Image_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__Image_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__Image_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Image_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__Image_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__Image_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Image_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Image'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__Image_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete_Image_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Abstract base class defining the interface for an image. This is\n" + " the top-level interface to the Exiv2 library.\n" + "\n" + "Image has containers to store image metadata and subclasses implement\n" + "read and save metadata from and to specific image formats.\n" + "\n" + "Most client apps will obtain an Image instance by calling a static\n" + "ImageFactory method. The Image class can then be used to to read, write,\n" + "and save metadata.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__Image_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__Image_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__Image_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.image.Image", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Image_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet ImageFactory___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ImageFactory_getset[] = { @@ -7637,7 +7808,7 @@ SwigPyBuiltin__Exiv2__ImageFactory_richcompare(PyObject *self, PyObject *other, result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -7813,42 +7984,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ImageFactory_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ImageFactory_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.image.ImageFactory", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_ImageFactory_destructor_closure, /* tp_dealloc */ + "exiv2.image.ImageFactory", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_ImageFactory_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ImageFactory_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__ImageFactory_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ImageFactory_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ImageFactory_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ImageFactory_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ImageFactory_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__ImageFactory_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ImageFactory_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -7856,176 +8028,295 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__ImageFactory_type = { "Returns an Image instance of the specified type.\n" "\n" "The factory is implemented as a static class.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ImageFactory_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ImageFactory_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ImageFactory_getset,/* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ImageFactory_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ImageFactory_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ImageFactory_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ImageFactory_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ImageFactory_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ImageFactory_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ImageFactory_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ImageFactory'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ImageFactory_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete_ImageFactory_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Returns an Image instance of the specified type.\n" + "\n" + "The factory is implemented as a static class.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ImageFactory_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ImageFactory_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ImageFactory_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.image.ImageFactory", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ImageFactory_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -8706,7 +8997,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -8889,7 +9180,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -8936,47 +9227,41 @@ SWIG_init(void) { "xmp",Exiv2::ImageType::xmp, NULL))); /* type 'Exiv2::Image' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Image_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'Image'."); + builtin_pytype = SwigPyBuiltin__Exiv2__Image_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__Image_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "Image", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "Image"); d = md; /* type 'Exiv2::ImageFactory' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ImageFactory_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'ImageFactory'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ImageFactory_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ImageFactory_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "ImageFactory", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "ImageFactory"); d = md; diff --git a/src/swig-0_27_7/iptc.py b/src/swig-0_27_7/iptc.py index b822c492..3e853a33 100644 --- a/src/swig-0_27_7/iptc.py +++ b/src/swig-0_27_7/iptc.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_27_7/iptc_wrap.cxx b/src/swig-0_27_7/iptc_wrap.cxx index afce7de5..9de52f52 100644 --- a/src/swig-0_27_7/iptc_wrap.cxx +++ b/src/swig-0_27_7/iptc_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_iptc" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -4010,7 +4062,6 @@ static swig_module_info swig_module = {swig_types, 56, 0, 0, 0, 0}; # define SWIG_init init_iptc #endif -#define SWIG_name "_iptc" #ifdef __cplusplus #include @@ -4080,7 +4131,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4088,7 +4139,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4096,8 +4147,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4106,7 +4157,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4129,7 +4180,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4143,11 +4194,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4304,7 +4353,7 @@ static void _set_python_exception() { - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4431,7 +4480,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -4454,10 +4503,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -4492,12 +4541,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -5174,7 +5219,7 @@ SwigPython_std_pair_repr (PyObject *o) PyTuple_SET_ITEM(tuple, 0, PyObject_GetAttrString(o, (char*) "first")); PyTuple_SET_ITEM(tuple, 1, PyObject_GetAttrString(o, (char*) "second")); PyObject *result = PyObject_Repr(tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -5497,7 +5542,7 @@ SWIGINTERN PyObject *_wrap_IptcData_iterator_base___eq__(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData_iterator_base___eq__" "', argument " "2"" of type '" "IptcData_iterator_base const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData_iterator_base___eq__" "', argument " "2"" of type '" "IptcData_iterator_base const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData_iterator_base___eq__" "', argument " "2"" of type '" "IptcData_iterator_base const &""'"); } arg2 = reinterpret_cast< IptcData_iterator_base * >(argp2); result = (bool)((IptcData_iterator_base const *)arg1)->operator ==((IptcData_iterator_base const &)*arg2); @@ -5508,7 +5553,7 @@ SWIGINTERN PyObject *_wrap_IptcData_iterator_base___eq__(PyObject *self, PyObjec return NULL; } PyErr_Clear(); - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } @@ -5535,7 +5580,7 @@ SWIGINTERN PyObject *_wrap_IptcData_iterator_base___ne__(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData_iterator_base___ne__" "', argument " "2"" of type '" "IptcData_iterator_base const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData_iterator_base___ne__" "', argument " "2"" of type '" "IptcData_iterator_base const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData_iterator_base___ne__" "', argument " "2"" of type '" "IptcData_iterator_base const &""'"); } arg2 = reinterpret_cast< IptcData_iterator_base * >(argp2); result = (bool)((IptcData_iterator_base const *)arg1)->operator !=((IptcData_iterator_base const &)*arg2); @@ -5546,7 +5591,7 @@ SWIGINTERN PyObject *_wrap_IptcData_iterator_base___ne__(PyObject *self, PyObjec return NULL; } PyErr_Clear(); - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } @@ -5733,7 +5778,7 @@ SWIGINTERN PyObject *_wrap_IptcData_iterator_setValue__SWIG_1(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData_iterator_setValue" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData_iterator_setValue" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData_iterator_setValue" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -6927,7 +6972,7 @@ SWIGINTERN int _wrap_new_Iptcdatum__SWIG_0(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Iptcdatum" "', argument " "1"" of type '" "Exiv2::IptcKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Iptcdatum" "', argument " "1"" of type '" "Exiv2::IptcKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_Iptcdatum" "', argument " "1"" of type '" "Exiv2::IptcKey const &""'"); } arg1 = reinterpret_cast< Exiv2::IptcKey * >(argp1); res2 = SWIG_ConvertPtr(obj2, &argp2,SWIGTYPE_p_Exiv2__Value, 0 | 0 ); @@ -6966,7 +7011,7 @@ SWIGINTERN int _wrap_new_Iptcdatum__SWIG_1(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Iptcdatum" "', argument " "1"" of type '" "Exiv2::IptcKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Iptcdatum" "', argument " "1"" of type '" "Exiv2::IptcKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_Iptcdatum" "', argument " "1"" of type '" "Exiv2::IptcKey const &""'"); } arg1 = reinterpret_cast< Exiv2::IptcKey * >(argp1); { @@ -7000,7 +7045,7 @@ SWIGINTERN int _wrap_new_Iptcdatum__SWIG_2(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Iptcdatum" "', argument " "1"" of type '" "Exiv2::Iptcdatum const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Iptcdatum" "', argument " "1"" of type '" "Exiv2::Iptcdatum const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_Iptcdatum" "', argument " "1"" of type '" "Exiv2::Iptcdatum const &""'"); } arg1 = reinterpret_cast< Exiv2::Iptcdatum * >(argp1); { @@ -7153,7 +7198,7 @@ SWIGINTERN PyObject *_wrap_Iptcdatum_setValue__SWIG_1(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Iptcdatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Iptcdatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Iptcdatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -8311,7 +8356,7 @@ SWIGINTERN PyObject *_wrap_IptcData_add__SWIG_0(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData_add" "', argument " "2"" of type '" "Exiv2::IptcKey const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData_add" "', argument " "2"" of type '" "Exiv2::IptcKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData_add" "', argument " "2"" of type '" "Exiv2::IptcKey const &""'"); } arg2 = reinterpret_cast< Exiv2::IptcKey * >(argp2); res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__Value, 0 | 0 ); @@ -8357,7 +8402,7 @@ SWIGINTERN PyObject *_wrap_IptcData_add__SWIG_1(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData_add" "', argument " "2"" of type '" "Exiv2::Iptcdatum const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData_add" "', argument " "2"" of type '" "Exiv2::Iptcdatum const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData_add" "', argument " "2"" of type '" "Exiv2::Iptcdatum const &""'"); } arg2 = reinterpret_cast< Exiv2::Iptcdatum * >(argp2); { @@ -8435,13 +8480,13 @@ SWIGINTERN PyObject *_wrap_IptcData_erase(PyObject *self, PyObject *args) { ; } if (!argp) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData_erase" "', argument " "2"" of type '" "IptcData_iterator_base""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData_erase" "', argument " "2"" of type '" "IptcData_iterator_base""'"); } arg2 = **argp; } { try { - result = (arg1)->erase(arg2); + result = (arg1)->erase(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -8631,7 +8676,7 @@ SWIGINTERN PyObject *_wrap_IptcData_findKey(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData_findKey" "', argument " "2"" of type '" "Exiv2::IptcKey const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData_findKey" "', argument " "2"" of type '" "Exiv2::IptcKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData_findKey" "', argument " "2"" of type '" "Exiv2::IptcKey const &""'"); } arg2 = reinterpret_cast< Exiv2::IptcKey * >(argp2); { @@ -8929,7 +8974,7 @@ SWIGINTERN PyObject *_wrap_IptcData___getitem__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData___getitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData___getitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData___getitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -8984,7 +9029,7 @@ SWIGINTERN PyObject *_wrap_IptcData___setitem____SWIG_0(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9037,7 +9082,7 @@ SWIGINTERN PyObject *_wrap_IptcData___setitem____SWIG_1(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9048,7 +9093,7 @@ SWIGINTERN PyObject *_wrap_IptcData___setitem____SWIG_1(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IptcData___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -9097,7 +9142,7 @@ SWIGINTERN PyObject *_wrap_IptcData___setitem____SWIG_2(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9143,7 +9188,7 @@ SWIGINTERN PyObject *_wrap_IptcData___setitem____SWIG_3(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9248,7 +9293,7 @@ SWIGINTERN PyObject *_wrap_IptcData___contains__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData___contains__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData___contains__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData___contains__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9348,7 +9393,7 @@ SwigPyBuiltin__IptcData_iterator_base_richcompare(PyObject *self, PyObject *othe PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); switch (op) { case Py_EQ : result = _wrap_IptcData_iterator_base___eq__(self, tuple); break; case Py_NE : result = _wrap_IptcData_iterator_base___ne__(self, tuple); break; @@ -9359,10 +9404,10 @@ SwigPyBuiltin__IptcData_iterator_base_richcompare(PyObject *self, PyObject *othe result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -9375,42 +9420,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__IptcData_iterator_base_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__IptcData_iterator_base_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.iptc.IptcData_iterator_base", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_IptcData_iterator_base_destructor_closure, /* tp_dealloc */ + "exiv2.iptc.IptcData_iterator_base", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_IptcData_iterator_base_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__IptcData_iterator_base_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__IptcData_iterator_base_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__IptcData_iterator_base_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - _wrap_IptcData_iterator_base___str___reprfunc_closure, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__IptcData_iterator_base_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__IptcData_iterator_base_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__IptcData_iterator_base_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__IptcData_iterator_base_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + _wrap_IptcData_iterator_base___str___reprfunc_closure, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__IptcData_iterator_base_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -9418,176 +9464,295 @@ static PyHeapTypeObject SwigPyBuiltin__IptcData_iterator_base_type = { "\n" "Python wrapper for an :class:`IptcData` iterator that points to\n" "the 'end' value and can not be dereferenced.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__IptcData_iterator_base_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_IptcData_iterator_base___iter___getiterfunc_closure, /* tp_iter */ - _wrap_IptcData_iterator_base___next___iternextfunc_closure, /* tp_iternext */ - SwigPyBuiltin__IptcData_iterator_base_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__IptcData_iterator_base_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__IptcData_iterator_base_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_IptcData_iterator_base___iter___getiterfunc_closure, /* tp_iter */ + _wrap_IptcData_iterator_base___next___iternextfunc_closure, /* tp_iternext */ + SwigPyBuiltin__IptcData_iterator_base_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__IptcData_iterator_base_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__IptcData_iterator_base_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__IptcData_iterator_base_type}; +static PyTypeObject *SwigPyBuiltin__IptcData_iterator_base_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__IptcData_iterator_base_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcData_iterator_base'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__IptcData_iterator_base_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete_IptcData_iterator_base_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "\n" + "Python wrapper for an :class:`IptcData` iterator that points to\n" + "the 'end' value and can not be dereferenced.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)_wrap_IptcData_iterator_base___str___reprfunc_closure }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__IptcData_iterator_base_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__IptcData_iterator_base_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__IptcData_iterator_base_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)_wrap_IptcData_iterator_base___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)_wrap_IptcData_iterator_base___next___iternextfunc_closure }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.iptc.IptcData_iterator_base", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__IptcData_iterator_base_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet IptcData_iterator___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__IptcData_iterator_getset[] = { @@ -9601,7 +9766,7 @@ SwigPyBuiltin__IptcData_iterator_richcompare(PyObject *self, PyObject *other, in PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); switch (op) { case Py_EQ : result = _wrap_IptcData_iterator_base___eq__(self, tuple); break; case Py_NE : result = _wrap_IptcData_iterator_base___ne__(self, tuple); break; @@ -9612,10 +9777,10 @@ SwigPyBuiltin__IptcData_iterator_richcompare(PyObject *self, PyObject *other, in result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -9648,7 +9813,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__IptcData_iterator_methods[] = { ":return: tag name\n" "" }, { "tagLabel", _wrap_IptcData_iterator_tagLabel, METH_VARARGS, "" }, - { "tag", _wrap_IptcData_iterator_tag, METH_VARARGS, " Return the tag (aka dataset) number" }, + { "tag", _wrap_IptcData_iterator_tag, METH_VARARGS, "Return the tag (aka dataset) number" }, { "typeId", _wrap_IptcData_iterator_typeId, METH_VARARGS, "" }, { "typeName", _wrap_IptcData_iterator_typeName, METH_VARARGS, "" }, { "typeSize", _wrap_IptcData_iterator_typeSize, METH_VARARGS, "" }, @@ -9669,42 +9834,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__IptcData_iterator_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__IptcData_iterator_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.iptc.IptcData_iterator", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_IptcData_iterator_destructor_closure, /* tp_dealloc */ + "exiv2.iptc.IptcData_iterator", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_IptcData_iterator_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__IptcData_iterator_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__IptcData_iterator_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__IptcData_iterator_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__IptcData_iterator_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__IptcData_iterator_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__IptcData_iterator_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__IptcData_iterator_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__IptcData_iterator_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -9713,176 +9879,296 @@ static PyHeapTypeObject SwigPyBuiltin__IptcData_iterator_type = { "Python wrapper for an :class:`IptcData` iterator. It has most of\n" "the methods of :class:`Iptcdatum` allowing easy access to the\n" "data it points to.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__IptcData_iterator_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__IptcData_iterator_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ SwigPyBuiltin__IptcData_iterator_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__IptcData_iterator_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + 0, /* tp_members */ + SwigPyBuiltin__IptcData_iterator_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__IptcData_iterator_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__IptcData_iterator_type}; +static PyTypeObject *SwigPyBuiltin__IptcData_iterator_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__IptcData_iterator_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcData_iterator'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__IptcData_iterator_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete_IptcData_iterator_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "\n" + "Python wrapper for an :class:`IptcData` iterator. It has most of\n" + "the methods of :class:`Iptcdatum` allowing easy access to the\n" + "data it points to.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__IptcData_iterator_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__IptcData_iterator_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__IptcData_iterator_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.iptc.IptcData_iterator", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__IptcData_iterator_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet Iptcdatum___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__Iptcdatum_getset[] = { @@ -9916,16 +10202,16 @@ SwigPyBuiltin__Exiv2__Iptcdatum_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -9957,7 +10243,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Iptcdatum_methods[] = { ":return: tag name\n" "" }, { "tagLabel", _wrap_Iptcdatum_tagLabel, METH_VARARGS, "" }, - { "tag", _wrap_Iptcdatum_tag, METH_VARARGS, " Return the tag (aka dataset) number" }, + { "tag", _wrap_Iptcdatum_tag, METH_VARARGS, "Return the tag (aka dataset) number" }, { "typeId", _wrap_Iptcdatum_typeId, METH_VARARGS, "" }, { "typeName", _wrap_Iptcdatum_typeName, METH_VARARGS, "" }, { "typeSize", _wrap_Iptcdatum_typeSize, METH_VARARGS, "" }, @@ -9973,218 +10259,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Iptcdatum_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__Iptcdatum_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.iptc.Iptcdatum", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_Iptcdatum_destructor_closure,/* tp_dealloc */ + "exiv2.iptc.Iptcdatum", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_Iptcdatum_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__Iptcdatum_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__Iptcdatum_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__Iptcdatum_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__Iptcdatum_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__Iptcdatum_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__Iptcdatum_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__Iptcdatum_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__Iptcdatum_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "An IPTC metadatum (\"dataset\"), consisting of an IptcKey and a\n" " Value and methods to manipulate these.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__Iptcdatum_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__Iptcdatum_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__Iptcdatum_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_Iptcdatum, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__Iptcdatum_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__Iptcdatum_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__Iptcdatum_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_Iptcdatum, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Iptcdatum_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__Iptcdatum_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__Iptcdatum_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Iptcdatum_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Iptcdatum'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__Iptcdatum_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_Iptcdatum }, + { Py_tp_dealloc, (void *)_wrap_delete_Iptcdatum_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "An IPTC metadatum (\"dataset\"), consisting of an IptcKey and a\n" + " Value and methods to manipulate these.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__Iptcdatum_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__Iptcdatum_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__Iptcdatum_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.iptc.Iptcdatum", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Iptcdatum_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet IptcData___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__IptcData_getset[] = { @@ -10219,16 +10624,16 @@ SwigPyBuiltin__Exiv2__IptcData_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -10261,11 +10666,11 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__IptcData_methods[] = { " the metadata, including pos, are potentially invalidated\n" " by this call.\n" "" }, - { "clear", _wrap_IptcData_clear, METH_VARARGS, " Delete all Iptcdatum instances resulting in an empty container." }, - { "sortByKey", _wrap_IptcData_sortByKey, METH_VARARGS, " Sort metadata by key" }, - { "sortByTag", _wrap_IptcData_sortByTag, METH_VARARGS, " Sort metadata by tag (aka dataset)" }, - { "begin", _wrap_IptcData_begin, METH_VARARGS, " Begin of the metadata" }, - { "end", _wrap_IptcData_end, METH_VARARGS, " End of the metadata" }, + { "clear", _wrap_IptcData_clear, METH_VARARGS, "Delete all Iptcdatum instances resulting in an empty container." }, + { "sortByKey", _wrap_IptcData_sortByKey, METH_VARARGS, "Sort metadata by key" }, + { "sortByTag", _wrap_IptcData_sortByTag, METH_VARARGS, "Sort metadata by tag (aka dataset)" }, + { "begin", _wrap_IptcData_begin, METH_VARARGS, "Begin of the metadata" }, + { "end", _wrap_IptcData_end, METH_VARARGS, "End of the metadata" }, { "findKey", _wrap_IptcData_findKey, METH_VARARGS, "\n" "Find the first Iptcdatum with the given key, return an iterator\n" " to it.\n" @@ -10274,52 +10679,53 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__IptcData_methods[] = { "Find the first Iptcdatum with the given record and dataset it,\n" " return a const iterator to it.\n" "" }, - { "empty", _wrap_IptcData_empty, METH_VARARGS, " Return true if there is no IPTC metadata" }, - { "count", _wrap_IptcData_count, METH_VARARGS, " Get the number of metadata entries" }, - { "size", _wrap_IptcData_size, METH_VARARGS, " Return the exact size of all contained IPTC metadata" }, - { "detectCharset", _wrap_IptcData_detectCharset, METH_VARARGS, " Return the metadata charset name or 0" }, + { "empty", _wrap_IptcData_empty, METH_VARARGS, "Return true if there is no IPTC metadata" }, + { "count", _wrap_IptcData_count, METH_VARARGS, "Get the number of metadata entries" }, + { "size", _wrap_IptcData_size, METH_VARARGS, "Return the exact size of all contained IPTC metadata" }, + { "detectCharset", _wrap_IptcData_detectCharset, METH_VARARGS, "Return the metadata charset name or 0" }, { "__getitem__", _wrap_IptcData___getitem__, METH_VARARGS, "" }, { "__setitem__", _wrap_IptcData___setitem__, METH_VARARGS, "" }, { "__contains__", _wrap_IptcData___contains__, METH_VARARGS, "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__IptcData_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.iptc.IptcData", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ + "exiv2.iptc.IptcData", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ _wrap_delete_IptcData_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__IptcData_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__IptcData_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__IptcData_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__IptcData_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__IptcData_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__IptcData_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__IptcData_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__IptcData_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -10333,176 +10739,301 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__IptcData_type = { "- add, modify and delete metadata\n" "- write IPTC data to JPEG files\n" "- extract IPTC metadata to files, insert from these files\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__IptcData_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__IptcData_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ _wrap_IptcData_begin_getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__IptcData_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__IptcData_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_IptcData, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__IptcData_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__IptcData_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_IptcData, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - _wrap_IptcData_count_lenfunc_closure, /* mp_length */ - _wrap_IptcData___getitem___binaryfunc_closure, /* mp_subscript */ - _wrap_IptcData___setitem___objobjargproc_closure, /* mp_ass_subscript */ + _wrap_IptcData_count_lenfunc_closure, /* mp_length */ + _wrap_IptcData___getitem___binaryfunc_closure, /* mp_subscript */ + _wrap_IptcData___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - _wrap_IptcData___contains___objobjproc_closure, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + _wrap_IptcData___contains___objobjproc_closure, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__IptcData_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__IptcData_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__IptcData_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__IptcData_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcData'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__IptcData_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_IptcData }, + { Py_tp_dealloc, (void *)_wrap_delete_IptcData_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "A container for IPTC data. This is a top-level class of\n" + " the %Exiv2 library.\n" + "\n" + "Provide high-level access to the IPTC data of an image:\n" + "- read IPTC information from JPEG files\n" + "- access metadata through keys and standard C++ iterators\n" + "- add, modify and delete metadata\n" + "- write IPTC data to JPEG files\n" + "- extract IPTC metadata to files, insert from these files\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__IptcData_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__IptcData_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__IptcData_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)_wrap_IptcData_count_lenfunc_closure }, + { Py_mp_subscript, (void *)_wrap_IptcData___getitem___binaryfunc_closure }, + { Py_mp_ass_subscript, (void *)_wrap_IptcData___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_IptcData_begin_getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)_wrap_IptcData___contains___objobjproc_closure }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.iptc.IptcData", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__IptcData_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -11097,7 +11628,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -11280,7 +11811,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -11306,31 +11837,27 @@ SWIG_init(void) { /* type '::IptcData_iterator_base' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__IptcData_iterator_base_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcData_iterator_base'."); + builtin_pytype = SwigPyBuiltin__IptcData_iterator_base_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__IptcData_iterator_base_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "IptcData_iterator_base", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "IptcData_iterator_base"); d = md; /* type '::IptcData_iterator' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__IptcData_iterator_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); { PyObject* module = PyImport_ImportModule("enum"); @@ -11342,8 +11869,6 @@ SWIG_init(void) { return NULL; } - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_IptcData_iterator_base"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -11357,27 +11882,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcData_iterator'."); + builtin_pytype = SwigPyBuiltin__IptcData_iterator_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__IptcData_iterator_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "IptcData_iterator", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "IptcData_iterator"); d = md; /* type 'Exiv2::Iptcdatum' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Iptcdatum_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Metadatum"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -11391,41 +11913,38 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'Iptcdatum'."); + builtin_pytype = SwigPyBuiltin__Exiv2__Iptcdatum_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__Iptcdatum_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "Iptcdatum", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "Iptcdatum"); d = md; /* type 'Exiv2::IptcData' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__IptcData_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcData'."); + builtin_pytype = SwigPyBuiltin__Exiv2__IptcData_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__IptcData_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "IptcData", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "IptcData"); d = md; diff --git a/src/swig-0_27_7/metadatum.py b/src/swig-0_27_7/metadatum.py index cdf38338..e3e53e6d 100644 --- a/src/swig-0_27_7/metadatum.py +++ b/src/swig-0_27_7/metadatum.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_27_7/metadatum_wrap.cxx b/src/swig-0_27_7/metadatum_wrap.cxx index edd8a604..06333bf3 100644 --- a/src/swig-0_27_7/metadatum_wrap.cxx +++ b/src/swig-0_27_7/metadatum_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_metadatum" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -4002,7 +4054,6 @@ static swig_module_info swig_module = {swig_types, 48, 0, 0, 0, 0}; # define SWIG_init init_metadatum #endif -#define SWIG_name "_metadatum" #ifdef __cplusplus #include @@ -4072,7 +4123,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4080,7 +4131,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4088,8 +4139,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4098,7 +4149,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4121,7 +4172,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4135,11 +4186,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4290,7 +4339,7 @@ static void _set_python_exception() { - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4377,7 +4426,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -4400,10 +4449,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -4438,12 +4487,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -5105,7 +5150,7 @@ SwigPython_std_pair_repr (PyObject *o) PyTuple_SET_ITEM(tuple, 0, PyObject_GetAttrString(o, (char*) "first")); PyTuple_SET_ITEM(tuple, 1, PyObject_GetAttrString(o, (char*) "second")); PyObject *result = PyObject_Repr(tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -5508,7 +5553,7 @@ SWIGINTERN PyObject *_wrap_Metadatum_setValue__SWIG_1(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Metadatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Metadatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Metadatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -6423,16 +6468,16 @@ SwigPyBuiltin__Exiv2__Key_richcompare(PyObject *self, PyObject *other, int op) { PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -6443,11 +6488,11 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Key_methods[] = { " key is not necessarily unique, e.g., an ExifData may contain\n" " multiple metadata with the same key.\n" "" }, - { "familyName", _wrap_Key_familyName, METH_VARARGS, " Return an identifier for the type of metadata (the first part of the key)" }, - { "groupName", _wrap_Key_groupName, METH_VARARGS, " Return the name of the group (the second part of the key)" }, - { "tagName", _wrap_Key_tagName, METH_VARARGS, " Return the name of the tag (which is also the third part of the key)" }, - { "tagLabel", _wrap_Key_tagLabel, METH_VARARGS, " Return a label for the tag" }, - { "tag", _wrap_Key_tag, METH_VARARGS, " Return the tag number" }, + { "familyName", _wrap_Key_familyName, METH_VARARGS, "Return an identifier for the type of metadata (the first part of the key)" }, + { "groupName", _wrap_Key_groupName, METH_VARARGS, "Return the name of the group (the second part of the key)" }, + { "tagName", _wrap_Key_tagName, METH_VARARGS, "Return the name of the tag (which is also the third part of the key)" }, + { "tagLabel", _wrap_Key_tagLabel, METH_VARARGS, "Return a label for the tag" }, + { "tag", _wrap_Key_tag, METH_VARARGS, "Return the tag number" }, { "clone", _wrap_Key_clone, METH_VARARGS, "\n" "Return an auto-pointer to a copy of itself (deep copy).\n" " The caller owns this copy and the auto-pointer ensures that it\n" @@ -6462,218 +6507,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Key_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__Key_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.metadatum.Key", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.metadatum.Key", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__Key_type.as_number,/* tp_as_number */ - &SwigPyBuiltin__Exiv2__Key_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__Key_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - _wrap_Key_key_reprfunc_closure, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__Key_type.as_buffer,/* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__Key_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__Key_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__Key_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + _wrap_Key_key_reprfunc_closure, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__Key_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Abstract base class defining the %Key of a metadatum.\n" " Keys are used to identify and group metadata.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__Key_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__Key_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__Key_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__Key_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__Key_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__Key_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Key_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__Key_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__Key_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Key_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Key'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__Key_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Abstract base class defining the %Key of a metadatum.\n" + " Keys are used to identify and group metadata.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)_wrap_Key_key_reprfunc_closure }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__Key_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__Key_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__Key_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.metadatum.Key", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Key_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet Metadatum___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__Metadatum_getset[] = { @@ -6701,16 +6865,16 @@ SwigPyBuiltin__Exiv2__Metadatum_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -6776,16 +6940,16 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Metadatum_methods[] = { " is not necessarily unique, e.g., an ExifData object may\n" " contain multiple metadata with the same key.\n" "" }, - { "familyName", _wrap_Metadatum_familyName, METH_VARARGS, " Return the name of the metadata family (which is also the first part of the key)" }, - { "groupName", _wrap_Metadatum_groupName, METH_VARARGS, " Return the name of the metadata group (which is also the second part of the key)" }, - { "tagName", _wrap_Metadatum_tagName, METH_VARARGS, " Return the name of the tag (which is also the third part of the key)" }, - { "tagLabel", _wrap_Metadatum_tagLabel, METH_VARARGS, " Return a label for the tag" }, - { "tag", _wrap_Metadatum_tag, METH_VARARGS, " Return the tag" }, - { "typeId", _wrap_Metadatum_typeId, METH_VARARGS, " Return the type id of the value" }, - { "typeName", _wrap_Metadatum_typeName, METH_VARARGS, " Return the name of the type" }, - { "typeSize", _wrap_Metadatum_typeSize, METH_VARARGS, " Return the size in bytes of one component of this type" }, - { "count", _wrap_Metadatum_count, METH_VARARGS, " Return the number of components in the value" }, - { "size", _wrap_Metadatum_size, METH_VARARGS, " Return the size of the value in bytes" }, + { "familyName", _wrap_Metadatum_familyName, METH_VARARGS, "Return the name of the metadata family (which is also the first part of the key)" }, + { "groupName", _wrap_Metadatum_groupName, METH_VARARGS, "Return the name of the metadata group (which is also the second part of the key)" }, + { "tagName", _wrap_Metadatum_tagName, METH_VARARGS, "Return the name of the tag (which is also the third part of the key)" }, + { "tagLabel", _wrap_Metadatum_tagLabel, METH_VARARGS, "Return a label for the tag" }, + { "tag", _wrap_Metadatum_tag, METH_VARARGS, "Return the tag" }, + { "typeId", _wrap_Metadatum_typeId, METH_VARARGS, "Return the type id of the value" }, + { "typeName", _wrap_Metadatum_typeName, METH_VARARGS, "Return the name of the type" }, + { "typeSize", _wrap_Metadatum_typeSize, METH_VARARGS, "Return the size in bytes of one component of this type" }, + { "count", _wrap_Metadatum_count, METH_VARARGS, "Return the number of components in the value" }, + { "size", _wrap_Metadatum_size, METH_VARARGS, "Return the size of the value in bytes" }, { "toString", _wrap_Metadatum_toString, METH_VARARGS, "\n" "*Overload 1:*\n" "Return the value as a string.\n" @@ -6845,218 +7009,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Metadatum_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__Metadatum_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.metadatum.Metadatum", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.metadatum.Metadatum", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__Metadatum_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__Metadatum_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__Metadatum_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__Metadatum_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__Metadatum_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__Metadatum_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ _wrap_Metadatum___str___reprfunc_closure, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__Metadatum_type.as_buffer, /* tp_as_buffer */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__Metadatum_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Abstract base class defining the interface to access information\n" " related to one metadata tag.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__Metadatum_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__Metadatum_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__Metadatum_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__Metadatum_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__Metadatum_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__Metadatum_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Metadatum_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__Metadatum_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__Metadatum_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Metadatum_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Metadatum'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__Metadatum_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Abstract base class defining the interface to access information\n" + " related to one metadata tag.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)_wrap_Metadatum___str___reprfunc_closure }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__Metadatum_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__Metadatum_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__Metadatum_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.metadatum.Metadatum", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Metadatum_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -7610,7 +7893,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -7793,7 +8076,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -7819,31 +8102,27 @@ SWIG_init(void) { /* type 'Exiv2::Key' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Key_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'Key'."); + builtin_pytype = SwigPyBuiltin__Exiv2__Key_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__Key_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "Key", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "Key"); d = md; /* type 'Exiv2::Metadatum' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Metadatum_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); { PyObject* module = PyImport_ImportModule("enum"); @@ -7855,22 +8134,20 @@ SWIG_init(void) { return NULL; } - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'Metadatum'."); + builtin_pytype = SwigPyBuiltin__Exiv2__Metadatum_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__Metadatum_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "Metadatum", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "Metadatum"); d = md; diff --git a/src/swig-0_27_7/preview.py b/src/swig-0_27_7/preview.py index 7bdcfa96..a1c630e7 100644 --- a/src/swig-0_27_7/preview.py +++ b/src/swig-0_27_7/preview.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_27_7/preview_wrap.cxx b/src/swig-0_27_7/preview_wrap.cxx index 45be809e..1e716d0a 100644 --- a/src/swig-0_27_7/preview_wrap.cxx +++ b/src/swig-0_27_7/preview_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_preview" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -4030,7 +4082,6 @@ static swig_module_info swig_module = {swig_types, 73, 0, 0, 0, 0}; # define SWIG_init init_preview #endif -#define SWIG_name "_preview" #ifdef __cplusplus #include @@ -4100,7 +4151,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4108,7 +4159,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4116,8 +4167,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4126,7 +4177,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4149,7 +4200,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4163,11 +4214,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4338,12 +4387,7 @@ namespace swig { } static swig_type_info* descriptor() { - static int init = 0; - static swig_type_info* desc = 0; - if (!init) { - desc = SWIG_TypeQuery("swig::SwigPyIterator *"); - init = 1; - } + static swig_type_info* desc = SWIG_TypeQuery("swig::SwigPyIterator *"); return desc; } }; @@ -4351,7 +4395,7 @@ namespace swig { #if defined(SWIGPYTHON_BUILTIN) inline PyObject* make_output_iterator_builtin (PyObject *pyself) { - Py_INCREF(pyself); + SWIG_Py_INCREF(pyself); return pyself; } #endif @@ -4474,7 +4518,7 @@ static void _set_python_exception() { - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -5147,7 +5191,7 @@ namespace swig { template <> struct traits_from { typedef PyObject * value_type; static PyObject *from(const value_type& val) { - Py_XINCREF(val); + SWIG_Py_XINCREF(val); return val; } }; @@ -5537,7 +5581,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -5560,10 +5604,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -5598,12 +5642,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -6123,7 +6163,7 @@ SWIGINTERN PyObject *_wrap_PreviewProperties___getitem__(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "PreviewProperties___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PreviewProperties___getitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "PreviewProperties___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -6176,7 +6216,7 @@ SWIGINTERN PyObject *_wrap_PreviewProperties___setitem__(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "PreviewProperties___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PreviewProperties___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "PreviewProperties___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -6250,7 +6290,7 @@ SWIGINTERN int _wrap_new_PreviewImage(PyObject *self, PyObject *args, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PreviewImage" "', argument " "1"" of type '" "Exiv2::PreviewImage const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PreviewImage" "', argument " "1"" of type '" "Exiv2::PreviewImage const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_PreviewImage" "', argument " "1"" of type '" "Exiv2::PreviewImage const &""'"); } arg1 = reinterpret_cast< Exiv2::PreviewImage * >(argp1); { @@ -6397,7 +6437,7 @@ SWIGINTERN PyObject *_wrap_PreviewImage_writeFile(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PreviewImage_writeFile" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PreviewImage_writeFile" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "PreviewImage_writeFile" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -6586,7 +6626,7 @@ SWIGINTERN int _wrap_new_PreviewManager(PyObject *self, PyObject *args, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PreviewManager" "', argument " "1"" of type '" "Exiv2::Image const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PreviewManager" "', argument " "1"" of type '" "Exiv2::Image const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_PreviewManager" "', argument " "1"" of type '" "Exiv2::Image const &""'"); } arg1 = reinterpret_cast< Exiv2::Image * >(argp1); { @@ -6663,7 +6703,7 @@ SWIGINTERN PyObject *_wrap_PreviewManager_getPreviewImage(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PreviewManager_getPreviewImage" "', argument " "2"" of type '" "Exiv2::PreviewProperties const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PreviewManager_getPreviewImage" "', argument " "2"" of type '" "Exiv2::PreviewProperties const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "PreviewManager_getPreviewImage" "', argument " "2"" of type '" "Exiv2::PreviewProperties const &""'"); } arg2 = reinterpret_cast< Exiv2::PreviewProperties * >(argp2); { @@ -6724,13 +6764,13 @@ static SwigPyGetSet PreviewProperties_width__getset = { _wrap_PreviewProperties_ static SwigPyGetSet PreviewProperties___dict___getset = { SwigPyObject_get___dict__, 0 }; static SwigPyGetSet PreviewProperties_extension__getset = { _wrap_PreviewProperties_extension__get, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__PreviewProperties_getset[] = { - { (char *)"height_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Preview image height in pixels or 0 for unknown height.", &PreviewProperties_height__getset }, - { (char *)"id_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Identifies type of preview image.", &PreviewProperties_id__getset }, - { (char *)"mimeType_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Preview image mime type.", &PreviewProperties_mimeType__getset }, - { (char *)"size_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Preview image size in bytes.", &PreviewProperties_size__getset }, - { (char *)"width_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Preview image width in pixels or 0 for unknown width.", &PreviewProperties_width__getset }, - { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Preview image mime type.", &PreviewProperties___dict___getset }, - { (char *)"extension_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Preview image extension.", &PreviewProperties_extension__getset }, + { (char *)"height_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Preview image height in pixels or 0 for unknown height.", &PreviewProperties_height__getset }, + { (char *)"id_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Identifies type of preview image.", &PreviewProperties_id__getset }, + { (char *)"mimeType_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Preview image mime type.", &PreviewProperties_mimeType__getset }, + { (char *)"size_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Preview image size in bytes.", &PreviewProperties_size__getset }, + { (char *)"width_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Preview image width in pixels or 0 for unknown width.", &PreviewProperties_width__getset }, + { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Preview image mime type.", &PreviewProperties___dict___getset }, + { (char *)"extension_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Preview image extension.", &PreviewProperties_extension__getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -6742,7 +6782,7 @@ SwigPyBuiltin__Exiv2__PreviewProperties_richcompare(PyObject *self, PyObject *ot result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -6772,219 +6812,335 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__PreviewProperties_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__PreviewProperties_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.preview.PreviewProperties", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_PreviewProperties_destructor_closure, /* tp_dealloc */ + "exiv2.preview.PreviewProperties", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_PreviewProperties_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__PreviewProperties_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__PreviewProperties_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__PreviewProperties_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__PreviewProperties_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__PreviewProperties_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__PreviewProperties_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__PreviewProperties_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__PreviewProperties_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Preview image properties.", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__PreviewProperties_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_PreviewProperties___iter___getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__PreviewProperties_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__PreviewProperties_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Preview image properties.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__PreviewProperties_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_PreviewProperties___iter___getiterfunc_closure, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__PreviewProperties_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__PreviewProperties_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - _wrap_PreviewProperties___getitem__, /* mp_subscript */ - _wrap_PreviewProperties___setitem___objobjargproc_closure, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + _wrap_PreviewProperties___getitem__, /* mp_subscript */ + _wrap_PreviewProperties___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__PreviewProperties_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__PreviewProperties_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__PreviewProperties_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__PreviewProperties_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'PreviewProperties'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__PreviewProperties_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete_PreviewProperties_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Preview image properties." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__PreviewProperties_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__PreviewProperties_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__PreviewProperties_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)_wrap_PreviewProperties___getitem__ }, + { Py_mp_ass_subscript, (void *)_wrap_PreviewProperties___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_PreviewProperties___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.preview.PreviewProperties", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__PreviewProperties_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet PreviewImage___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__PreviewImage_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Copy constructor", &PreviewImage___dict___getset }, + { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Copy constructor", &PreviewImage___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -6996,7 +7152,7 @@ SwigPyBuiltin__Exiv2__PreviewImage_richcompare(PyObject *self, PyObject *other, result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -7014,7 +7170,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__PreviewImage_methods[] = { "\n" ":rtype: memoryview\n" "" }, - { "size", _wrap_PreviewImage_size, METH_NOARGS, " Return the size of the preview image in bytes." }, + { "size", _wrap_PreviewImage_size, METH_NOARGS, "Return the size of the preview image in bytes." }, { "writeFile", _wrap_PreviewImage_writeFile, METH_O, "\n" "Write the thumbnail image to a file.\n" "\n" @@ -7035,226 +7191,342 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__PreviewImage_methods[] = { "Return the file extension for the format of the preview image\n" " (\".tif\" or \".jpg\").\n" "" }, - { "width", _wrap_PreviewImage_width, METH_NOARGS, " Return the width of the preview image in pixels." }, - { "height", _wrap_PreviewImage_height, METH_NOARGS, " Return the height of the preview image in pixels." }, - { "id", _wrap_PreviewImage_id, METH_NOARGS, " Return the preview image type identifier." }, + { "width", _wrap_PreviewImage_width, METH_NOARGS, "Return the width of the preview image in pixels." }, + { "height", _wrap_PreviewImage_height, METH_NOARGS, "Return the height of the preview image in pixels." }, + { "id", _wrap_PreviewImage_id, METH_NOARGS, "Return the preview image type identifier." }, { "__len__", _wrap_PreviewImage___len__, METH_NOARGS, "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__PreviewImage_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.preview.PreviewImage", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_PreviewImage_destructor_closure, /* tp_dealloc */ + "exiv2.preview.PreviewImage", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_PreviewImage_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__PreviewImage_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__PreviewImage_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__PreviewImage_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__PreviewImage_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__PreviewImage_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__PreviewImage_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__PreviewImage_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__PreviewImage_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Class that holds preview image properties and data buffer.",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__PreviewImage_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__PreviewImage_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__PreviewImage_getset,/* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_PreviewImage, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Class that holds preview image properties and data buffer.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__PreviewImage_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__PreviewImage_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__PreviewImage_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_PreviewImage, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_PreviewImage___len___lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + _wrap_PreviewImage___len___lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - getbuffer_Exiv2_PreviewImage, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + getbuffer_Exiv2_PreviewImage, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__PreviewImage_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__PreviewImage_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__PreviewImage_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__PreviewImage_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'PreviewImage'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__PreviewImage_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_PreviewImage }, + { Py_tp_dealloc, (void *)_wrap_delete_PreviewImage_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Class that holds preview image properties and data buffer." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__PreviewImage_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__PreviewImage_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__PreviewImage_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_PreviewImage___len___lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.preview.PreviewImage", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__PreviewImage_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet PreviewManager___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__PreviewManager_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Constructor.", &PreviewManager___dict___getset }, + { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Constructor.", &PreviewManager___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -7266,7 +7538,7 @@ SwigPyBuiltin__Exiv2__PreviewManager_richcompare(PyObject *self, PyObject *other result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -7278,219 +7550,335 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__PreviewManager_methods[] = { " sorted by preview width * height, starting with the smallest\n" " preview image.\n" "" }, - { "getPreviewImage", _wrap_PreviewManager_getPreviewImage, METH_O, " Return the preview image for the given preview properties." }, + { "getPreviewImage", _wrap_PreviewManager_getPreviewImage, METH_O, "Return the preview image for the given preview properties." }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__PreviewManager_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.preview.PreviewManager", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_PreviewManager_destructor_closure, /* tp_dealloc */ + "exiv2.preview.PreviewManager", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_PreviewManager_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__PreviewManager_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__PreviewManager_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__PreviewManager_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__PreviewManager_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__PreviewManager_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__PreviewManager_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__PreviewManager_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__PreviewManager_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Class for extracting preview images from image metadata.",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__PreviewManager_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__PreviewManager_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__PreviewManager_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_PreviewManager, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Class for extracting preview images from image metadata.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__PreviewManager_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__PreviewManager_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__PreviewManager_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_PreviewManager, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__PreviewManager_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__PreviewManager_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__PreviewManager_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__PreviewManager_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'PreviewManager'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__PreviewManager_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_PreviewManager }, + { Py_tp_dealloc, (void *)_wrap_delete_PreviewManager_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Class for extracting preview images from image metadata." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__PreviewManager_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__PreviewManager_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__PreviewManager_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.preview.PreviewManager", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__PreviewManager_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -8171,7 +8559,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -8354,7 +8742,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -8380,70 +8768,61 @@ SWIG_init(void) { /* type 'Exiv2::PreviewProperties' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__PreviewProperties_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'PreviewProperties'."); + builtin_pytype = SwigPyBuiltin__Exiv2__PreviewProperties_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__PreviewProperties_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "PreviewProperties", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "PreviewProperties"); d = md; /* type 'Exiv2::PreviewImage' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__PreviewImage_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'PreviewImage'."); + builtin_pytype = SwigPyBuiltin__Exiv2__PreviewImage_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__PreviewImage_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "PreviewImage", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "PreviewImage"); d = md; /* type 'Exiv2::PreviewManager' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__PreviewManager_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'PreviewManager'."); + builtin_pytype = SwigPyBuiltin__Exiv2__PreviewManager_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__PreviewManager_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "PreviewManager", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "PreviewManager"); d = md; diff --git a/src/swig-0_27_7/properties.py b/src/swig-0_27_7/properties.py index 27fed16a..65aa03d7 100644 --- a/src/swig-0_27_7/properties.py +++ b/src/swig-0_27_7/properties.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_27_7/properties_wrap.cxx b/src/swig-0_27_7/properties_wrap.cxx index 10c36ab5..9314ff75 100644 --- a/src/swig-0_27_7/properties_wrap.cxx +++ b/src/swig-0_27_7/properties_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_properties" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -4004,7 +4056,6 @@ static swig_module_info swig_module = {swig_types, 50, 0, 0, 0, 0}; # define SWIG_init init_properties #endif -#define SWIG_name "_properties" #ifdef __cplusplus #include @@ -4074,7 +4125,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4082,7 +4133,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4090,8 +4141,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4100,7 +4151,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4123,7 +4174,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4137,11 +4188,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4292,7 +4341,7 @@ static void _set_python_exception() { - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4516,7 +4565,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -4539,10 +4588,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -4577,12 +4626,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -4989,7 +5034,7 @@ SWIGINTERN PyObject *_wrap_XmpPropertyInfo___getitem__(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "XmpPropertyInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpPropertyInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpPropertyInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -5042,7 +5087,7 @@ SWIGINTERN PyObject *_wrap_XmpPropertyInfo___setitem__(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "XmpPropertyInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpPropertyInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpPropertyInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -5131,7 +5176,7 @@ SWIGINTERN PyObject *_wrap_XmpNsInfo_xmpPropertyInfo__get(PyObject *self, PyObje PyObject* list = pointer_to_list(result); if (!list) SWIG_fail; - resultobj = SWIG_Python_AppendOutput(resultobj, list); + resultobj = SWIG_Python_AppendOutput(resultobj, list, 0); } return resultobj; fail: @@ -5320,7 +5365,7 @@ SWIGINTERN PyObject *_wrap_XmpNsInfo___getitem__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "XmpNsInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpNsInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpNsInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -5373,7 +5418,7 @@ SWIGINTERN PyObject *_wrap_XmpNsInfo___setitem__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "XmpNsInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpNsInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpNsInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -5417,7 +5462,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_propertyTitle(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_propertyTitle" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_propertyTitle" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_propertyTitle" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } arg1 = reinterpret_cast< Exiv2::XmpKey * >(argp1); result = (char *)Exiv2::XmpProperties::propertyTitle((Exiv2::XmpKey const &)*arg1); @@ -5443,7 +5488,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_propertyDesc(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_propertyDesc" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_propertyDesc" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_propertyDesc" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } arg1 = reinterpret_cast< Exiv2::XmpKey * >(argp1); result = (char *)Exiv2::XmpProperties::propertyDesc((Exiv2::XmpKey const &)*arg1); @@ -5469,7 +5514,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_propertyType(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_propertyType" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_propertyType" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_propertyType" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } arg1 = reinterpret_cast< Exiv2::XmpKey * >(argp1); result = (Exiv2::TypeId)Exiv2::XmpProperties::propertyType((Exiv2::XmpKey const &)*arg1); @@ -5499,7 +5544,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_propertyInfo(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_propertyInfo" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_propertyInfo" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_propertyInfo" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } arg1 = reinterpret_cast< Exiv2::XmpKey * >(argp1); result = (Exiv2::XmpPropertyInfo *)Exiv2::XmpProperties::propertyInfo((Exiv2::XmpKey const &)*arg1); @@ -5526,7 +5571,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_ns(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_ns" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_ns" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_ns" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5564,7 +5609,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_nsDesc(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_nsDesc" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_nsDesc" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_nsDesc" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5602,7 +5647,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_propertyList(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_propertyList" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_propertyList" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_propertyList" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5619,7 +5664,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_propertyList(PyObject *self, PyObject * PyObject* list = pointer_to_list(result); if (!list) SWIG_fail; - resultobj = SWIG_Python_AppendOutput(resultobj, list); + resultobj = SWIG_Python_AppendOutput(resultobj, list, 0); } if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -5645,7 +5690,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_nsInfo(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_nsInfo" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_nsInfo" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_nsInfo" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5683,7 +5728,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_prefix(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_prefix" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_prefix" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_prefix" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5713,7 +5758,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_registerNs(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_registerNs" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_registerNs" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_registerNs" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5724,7 +5769,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_registerNs(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpProperties_registerNs" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_registerNs" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_registerNs" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -5761,7 +5806,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_unregisterNs__SWIG_0(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_unregisterNs" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_unregisterNs" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_unregisterNs" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5860,7 +5905,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_registeredNamespaces(PyObject *self, Py PyDict_SetItemString(dict, i->first.c_str(), value); Py_DECREF(value); } - resultobj = SWIG_Python_AppendOutput(resultobj, dict); + resultobj = SWIG_Python_AppendOutput(resultobj, dict, 1); } return resultobj; fail: @@ -5882,7 +5927,7 @@ SWIGINTERN int _wrap_new_XmpKey__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XmpKey" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XmpKey" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_XmpKey" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5920,7 +5965,7 @@ SWIGINTERN int _wrap_new_XmpKey__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XmpKey" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XmpKey" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_XmpKey" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5931,7 +5976,7 @@ SWIGINTERN int _wrap_new_XmpKey__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObje SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_XmpKey" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XmpKey" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_XmpKey" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -5968,7 +6013,7 @@ SWIGINTERN int _wrap_new_XmpKey__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XmpKey" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XmpKey" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_XmpKey" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } arg1 = reinterpret_cast< Exiv2::XmpKey * >(argp1); { @@ -6251,13 +6296,13 @@ static SwigPyGetSet XmpPropertyInfo_name__getset = { _wrap_XmpPropertyInfo_name_ static SwigPyGetSet XmpPropertyInfo_xmpValueType__getset = { _wrap_XmpPropertyInfo_xmpValueType__get, 0 }; static SwigPyGetSet XmpPropertyInfo_xmpCategory__getset = { _wrap_XmpPropertyInfo_xmpCategory__get, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XmpPropertyInfo_getset[] = { - { (char *)"title_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Property title or label", &XmpPropertyInfo_title__getset }, - { (char *)"typeId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Exiv2 default type for the property", &XmpPropertyInfo_typeId__getset }, - { (char *)"desc_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Property description", &XmpPropertyInfo_desc__getset }, - { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Property name", &XmpPropertyInfo___dict___getset }, - { (char *)"name_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Property name", &XmpPropertyInfo_name__getset }, - { (char *)"xmpValueType_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" XMP value type (for info only)", &XmpPropertyInfo_xmpValueType__getset }, - { (char *)"xmpCategory_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Category (internal or external)", &XmpPropertyInfo_xmpCategory__getset }, + { (char *)"title_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Property title or label", &XmpPropertyInfo_title__getset }, + { (char *)"typeId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Exiv2 default type for the property", &XmpPropertyInfo_typeId__getset }, + { (char *)"desc_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Property description", &XmpPropertyInfo_desc__getset }, + { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Property name", &XmpPropertyInfo___dict___getset }, + { (char *)"name_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Property name", &XmpPropertyInfo_name__getset }, + { (char *)"xmpValueType_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"XMP value type (for info only)", &XmpPropertyInfo_xmpValueType__getset }, + { (char *)"xmpCategory_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Category (internal or external)", &XmpPropertyInfo_xmpCategory__getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -6269,7 +6314,7 @@ SwigPyBuiltin__Exiv2__XmpPropertyInfo_richcompare(PyObject *self, PyObject *othe result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -6299,215 +6344,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpPropertyInfo_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpPropertyInfo_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.properties.XmpPropertyInfo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.properties.XmpPropertyInfo", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XmpPropertyInfo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XmpPropertyInfo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XmpPropertyInfo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XmpPropertyInfo_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__XmpPropertyInfo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__XmpPropertyInfo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__XmpPropertyInfo_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__XmpPropertyInfo_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Information about one XMP property.", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__XmpPropertyInfo_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_XmpPropertyInfo___iter___getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XmpPropertyInfo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XmpPropertyInfo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Information about one XMP property.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__XmpPropertyInfo_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_XmpPropertyInfo___iter___getiterfunc_closure, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__XmpPropertyInfo_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__XmpPropertyInfo_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - _wrap_XmpPropertyInfo___getitem__, /* mp_subscript */ - _wrap_XmpPropertyInfo___setitem___objobjargproc_closure, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + _wrap_XmpPropertyInfo___getitem__, /* mp_subscript */ + _wrap_XmpPropertyInfo___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpPropertyInfo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpPropertyInfo_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpPropertyInfo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpPropertyInfo_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpPropertyInfo'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpPropertyInfo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Information about one XMP property." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__XmpPropertyInfo_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__XmpPropertyInfo_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__XmpPropertyInfo_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)_wrap_XmpPropertyInfo___getitem__ }, + { Py_mp_ass_subscript, (void *)_wrap_XmpPropertyInfo___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_XmpPropertyInfo___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.properties.XmpPropertyInfo", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpPropertyInfo_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet XmpNsInfo_xmpPropertyInfo__getset = { _wrap_XmpNsInfo_xmpPropertyInfo__get, 0 }; static SwigPyGetSet XmpNsInfo_desc__getset = { _wrap_XmpNsInfo_desc__get, 0 }; @@ -6515,11 +6676,11 @@ static SwigPyGetSet XmpNsInfo___dict___getset = { SwigPyObject_get___dict__, 0 } static SwigPyGetSet XmpNsInfo_ns__getset = { _wrap_XmpNsInfo_ns__get, 0 }; static SwigPyGetSet XmpNsInfo_prefix__getset = { _wrap_XmpNsInfo_prefix__get, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XmpNsInfo_getset[] = { - { (char *)"xmpPropertyInfo_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" List of known properties", &XmpNsInfo_xmpPropertyInfo__getset }, - { (char *)"desc_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Brief description of the namespace", &XmpNsInfo_desc__getset }, - { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Namespace", &XmpNsInfo___dict___getset }, - { (char *)"ns_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Namespace", &XmpNsInfo_ns__getset }, - { (char *)"prefix_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" (Preferred) prefix", &XmpNsInfo_prefix__getset }, + { (char *)"xmpPropertyInfo_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"List of known properties", &XmpNsInfo_xmpPropertyInfo__getset }, + { (char *)"desc_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Brief description of the namespace", &XmpNsInfo_desc__getset }, + { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Namespace", &XmpNsInfo___dict___getset }, + { (char *)"ns_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Namespace", &XmpNsInfo_ns__getset }, + { (char *)"prefix_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"(Preferred) prefix", &XmpNsInfo_prefix__getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -6531,7 +6692,7 @@ SwigPyBuiltin__Exiv2__XmpNsInfo_richcompare(PyObject *self, PyObject *other, int result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -6561,215 +6722,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpNsInfo_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpNsInfo_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.properties.XmpNsInfo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.properties.XmpNsInfo", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XmpNsInfo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XmpNsInfo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XmpNsInfo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XmpNsInfo_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__XmpNsInfo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__XmpNsInfo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__XmpNsInfo_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__XmpNsInfo_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Structure mapping XMP namespaces and (preferred) prefixes.",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__XmpNsInfo_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_XmpNsInfo___iter___getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XmpNsInfo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XmpNsInfo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Structure mapping XMP namespaces and (preferred) prefixes.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__XmpNsInfo_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_XmpNsInfo___iter___getiterfunc_closure, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__XmpNsInfo_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__XmpNsInfo_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - _wrap_XmpNsInfo___getitem__, /* mp_subscript */ - _wrap_XmpNsInfo___setitem___objobjargproc_closure, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + _wrap_XmpNsInfo___getitem__, /* mp_subscript */ + _wrap_XmpNsInfo___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpNsInfo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpNsInfo_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpNsInfo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpNsInfo_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpNsInfo'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpNsInfo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Structure mapping XMP namespaces and (preferred) prefixes." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__XmpNsInfo_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__XmpNsInfo_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__XmpNsInfo_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)_wrap_XmpNsInfo___getitem__ }, + { Py_mp_ass_subscript, (void *)_wrap_XmpNsInfo___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_XmpNsInfo___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.properties.XmpNsInfo", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpNsInfo_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet XmpProperties___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XmpProperties_getset[] = { @@ -6792,7 +7069,7 @@ SwigPyBuiltin__Exiv2__XmpProperties_richcompare(PyObject *self, PyObject *other, result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -6909,219 +7186,335 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpProperties_methods[] = { "\n" "Notes: This invalidates XMP keys generated in any custom namespace.\n" "" }, - { "registeredNamespaces", (PyCFunction)(void(*)(void))_wrap_XmpProperties_registeredNamespaces, METH_STATIC|METH_NOARGS, " Get all registered namespaces (for both Exiv2 and XMPsdk)" }, + { "registeredNamespaces", (PyCFunction)(void(*)(void))_wrap_XmpProperties_registeredNamespaces, METH_STATIC|METH_NOARGS, "Get all registered namespaces (for both Exiv2 and XMPsdk)" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpProperties_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.properties.XmpProperties", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.properties.XmpProperties", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XmpProperties_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XmpProperties_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XmpProperties_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XmpProperties_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__XmpProperties_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__XmpProperties_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__XmpProperties_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__XmpProperties_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " XMP property reference, implemented as a static class.", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__XmpProperties_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XmpProperties_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XmpProperties_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "XMP property reference, implemented as a static class.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__XmpProperties_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__XmpProperties_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__XmpProperties_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpProperties_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpProperties_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpProperties_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpProperties_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpProperties'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpProperties_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"XMP property reference, implemented as a static class." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__XmpProperties_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__XmpProperties_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__XmpProperties_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.properties.XmpProperties", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpProperties_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet XmpKey___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XmpKey_getset[] = { @@ -7166,7 +7559,7 @@ SwigPyBuiltin__Exiv2__XmpKey_richcompare(PyObject *self, PyObject *other, int op result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -7181,221 +7574,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpKey_methods[] = { "" }, { "tagName", _wrap_XmpKey_tagName, METH_NOARGS, "" }, { "tagLabel", _wrap_XmpKey_tagLabel, METH_NOARGS, "" }, - { "tag", _wrap_XmpKey_tag, METH_NOARGS, " Properties don't have a tag number. Return 0." }, + { "tag", _wrap_XmpKey_tag, METH_NOARGS, "Properties don't have a tag number. Return 0." }, { "clone", _wrap_XmpKey_clone, METH_NOARGS, "" }, - { "ns", _wrap_XmpKey_ns, METH_NOARGS, " Return the schema namespace for the prefix of the key" }, + { "ns", _wrap_XmpKey_ns, METH_NOARGS, "Return the schema namespace for the prefix of the key" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpKey_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.properties.XmpKey", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_XmpKey_destructor_closure, /* tp_dealloc */ + "exiv2.properties.XmpKey", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_XmpKey_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XmpKey_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XmpKey_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XmpKey_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - _wrap_XmpKey_key_reprfunc_closure, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XmpKey_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__XmpKey_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__XmpKey_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__XmpKey_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + _wrap_XmpKey_key_reprfunc_closure, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__XmpKey_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Concrete keys for XMP metadata.", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ + "Concrete keys for XMP metadata.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ SwigPyBuiltin__Exiv2__XmpKey_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XmpKey_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XmpKey_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_XmpKey, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__XmpKey_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__XmpKey_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_XmpKey, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpKey_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpKey_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpKey_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpKey_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpKey'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpKey_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_XmpKey }, + { Py_tp_dealloc, (void *)_wrap_delete_XmpKey_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Concrete keys for XMP metadata." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)_wrap_XmpKey_key_reprfunc_closure }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__XmpKey_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__XmpKey_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__XmpKey_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.properties.XmpKey", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpKey_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -7960,7 +8469,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -8143,7 +8652,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -8182,79 +8691,67 @@ SWIG_init(void) { "XmpCategory", "Category of an XMP property.", _get_enum_list(0, "xmpInternal",Exiv2::xmpInternal,"xmpExternal",Exiv2::xmpExternal,"Internal",Exiv2::xmpInternal,"External",Exiv2::xmpExternal, NULL))); /* type 'Exiv2::XmpPropertyInfo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpPropertyInfo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpPropertyInfo'."); + builtin_pytype = SwigPyBuiltin__Exiv2__XmpPropertyInfo_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__XmpPropertyInfo_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpPropertyInfo", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpPropertyInfo"); d = md; /* type 'Exiv2::XmpNsInfo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpNsInfo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpNsInfo'."); + builtin_pytype = SwigPyBuiltin__Exiv2__XmpNsInfo_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__XmpNsInfo_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpNsInfo", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpNsInfo"); d = md; /* type 'Exiv2::XmpProperties' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpProperties_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpProperties'."); + builtin_pytype = SwigPyBuiltin__Exiv2__XmpProperties_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__XmpProperties_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpProperties", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpProperties"); d = md; /* type 'Exiv2::XmpKey' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpKey_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Key"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -8268,18 +8765,18 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpKey'."); + builtin_pytype = SwigPyBuiltin__Exiv2__XmpKey_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__XmpKey_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpKey", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpKey"); d = md; diff --git a/src/swig-0_27_7/tags.py b/src/swig-0_27_7/tags.py index a5f274ea..290d8e16 100644 --- a/src/swig-0_27_7/tags.py +++ b/src/swig-0_27_7/tags.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_27_7/tags_wrap.cxx b/src/swig-0_27_7/tags_wrap.cxx index 6e7c83f3..9a35e13a 100644 --- a/src/swig-0_27_7/tags_wrap.cxx +++ b/src/swig-0_27_7/tags_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_tags" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -4004,7 +4056,6 @@ static swig_module_info swig_module = {swig_types, 50, 0, 0, 0, 0}; # define SWIG_init init_tags #endif -#define SWIG_name "_tags" #ifdef __cplusplus #include @@ -4074,7 +4125,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4082,7 +4133,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4090,8 +4141,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4100,7 +4151,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4123,7 +4174,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4137,11 +4188,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4292,7 +4341,7 @@ static void _set_python_exception() { - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4458,7 +4507,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -4481,10 +4530,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -4519,12 +4568,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -4922,7 +4967,7 @@ SWIGINTERN PyObject *_wrap__TagListFct___call__(PyObject *self, PyObject *args) PyObject* list = pointer_to_list(result); if (!list) SWIG_fail; - resultobj = SWIG_Python_AppendOutput(resultobj, list); + resultobj = SWIG_Python_AppendOutput(resultobj, list, 0); } return resultobj; fail: @@ -5168,7 +5213,7 @@ SWIGINTERN PyObject *_wrap_GroupInfo___getitem__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GroupInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GroupInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "GroupInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -5213,7 +5258,7 @@ SWIGINTERN PyObject *_wrap_GroupInfo___setitem__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GroupInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GroupInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "GroupInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -5534,7 +5579,7 @@ SWIGINTERN PyObject *_wrap_TagInfo___getitem__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TagInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TagInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "TagInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -5579,7 +5624,7 @@ SWIGINTERN PyObject *_wrap_TagInfo___setitem__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TagInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TagInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "TagInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -5610,7 +5655,7 @@ SWIGINTERN PyObject *_wrap_ExifTags_groupList(PyObject *self, PyObject *args) { PyObject* list = pointer_to_list(result); if (!list) SWIG_fail; - resultobj = SWIG_Python_AppendOutput(resultobj, list); + resultobj = SWIG_Python_AppendOutput(resultobj, list, 0); } return resultobj; fail: @@ -5634,7 +5679,7 @@ SWIGINTERN PyObject *_wrap_ExifTags_tagList(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExifTags_tagList" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifTags_tagList" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifTags_tagList" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5643,7 +5688,7 @@ SWIGINTERN PyObject *_wrap_ExifTags_tagList(PyObject *self, PyObject *args) { PyObject* list = pointer_to_list(result); if (!list) SWIG_fail; - resultobj = SWIG_Python_AppendOutput(resultobj, list); + resultobj = SWIG_Python_AppendOutput(resultobj, list, 0); } if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -5668,7 +5713,7 @@ SWIGINTERN PyObject *_wrap_ExifTags_sectionName(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExifTags_sectionName" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifTags_sectionName" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifTags_sectionName" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifKey * >(argp1); result = (char *)Exiv2::ExifTags::sectionName((Exiv2::ExifKey const &)*arg1); @@ -5694,7 +5739,7 @@ SWIGINTERN PyObject *_wrap_ExifTags_defaultCount(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExifTags_defaultCount" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifTags_defaultCount" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifTags_defaultCount" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifKey * >(argp1); result = (uint16_t)Exiv2::ExifTags::defaultCount((Exiv2::ExifKey const &)*arg1); @@ -5721,7 +5766,7 @@ SWIGINTERN PyObject *_wrap_ExifTags_ifdName(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExifTags_ifdName" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifTags_ifdName" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifTags_ifdName" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5751,7 +5796,7 @@ SWIGINTERN PyObject *_wrap_ExifTags_isMakerGroup(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExifTags_isMakerGroup" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifTags_isMakerGroup" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifTags_isMakerGroup" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5781,7 +5826,7 @@ SWIGINTERN PyObject *_wrap_ExifTags_isExifGroup(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExifTags_isExifGroup" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifTags_isExifGroup" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifTags_isExifGroup" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5809,7 +5854,7 @@ SWIGINTERN int _wrap_new_ExifKey__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ExifKey" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ExifKey" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_ExifKey" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5853,7 +5898,7 @@ SWIGINTERN int _wrap_new_ExifKey__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObj SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ExifKey" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ExifKey" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_ExifKey" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -5888,7 +5933,7 @@ SWIGINTERN int _wrap_new_ExifKey__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ExifKey" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ExifKey" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_ExifKey" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifKey * >(argp1); { @@ -6245,7 +6290,7 @@ SwigPyBuiltin___TagListFct_richcompare(PyObject *self, PyObject *other, int op) result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -6256,215 +6301,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin___TagListFct_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin___TagListFct_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.tags._TagListFct", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete__TagListFct_destructor_closure, /* tp_dealloc */ + "exiv2.tags._TagListFct", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete__TagListFct_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin___TagListFct_type.as_number, /* tp_as_number */ - &SwigPyBuiltin___TagListFct_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin___TagListFct_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - _wrap__TagListFct___call___ternarycallfunc_closure, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin___TagListFct_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin___TagListFct_type.as_number, /* tp_as_number */ + &SwigPyBuiltin___TagListFct_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin___TagListFct_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + _wrap__TagListFct___call___ternarycallfunc_closure, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin___TagListFct_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - "::_TagListFct", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin___TagListFct_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin___TagListFct_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin___TagListFct_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "::_TagListFct", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin___TagListFct_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin___TagListFct_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin___TagListFct_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin___TagListFct_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin___TagListFct_type}; +static PyTypeObject *SwigPyBuiltin___TagListFct_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin___TagListFct_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type '_TagListFct'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin___TagListFct_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete__TagListFct_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"::_TagListFct" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin___TagListFct_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin___TagListFct_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin___TagListFct_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)_wrap__TagListFct___call___ternarycallfunc_closure }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.tags._TagListFct", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin___TagListFct_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet GroupInfo_ifdId__getset = { _wrap_GroupInfo_ifdId__get, 0 }; static SwigPyGetSet GroupInfo_groupName__getset = { _wrap_GroupInfo_groupName__get, 0 }; @@ -6472,11 +6633,11 @@ static SwigPyGetSet GroupInfo___dict___getset = { SwigPyObject_get___dict__, 0 } static SwigPyGetSet GroupInfo_ifdName__getset = { _wrap_GroupInfo_ifdName__get, 0 }; static SwigPyGetSet GroupInfo_tagList__getset = { _wrap_GroupInfo_tagList__get, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__GroupInfo_getset[] = { - { (char *)"ifdId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" IFD id", &GroupInfo_ifdId__getset }, - { (char *)"groupName_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Group name, unique for each group.", &GroupInfo_groupName__getset }, - { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" IFD id", &GroupInfo___dict___getset }, - { (char *)"ifdName_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" IFD name", &GroupInfo_ifdName__getset }, - { (char *)"tagList_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Tag list", &GroupInfo_tagList__getset }, + { (char *)"ifdId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"IFD id", &GroupInfo_ifdId__getset }, + { (char *)"groupName_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Group name, unique for each group.", &GroupInfo_groupName__getset }, + { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"IFD id", &GroupInfo___dict___getset }, + { (char *)"ifdName_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"IFD name", &GroupInfo_ifdName__getset }, + { (char *)"tagList_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Tag list", &GroupInfo_tagList__getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -6488,7 +6649,7 @@ SwigPyBuiltin__Exiv2__GroupInfo_richcompare(PyObject *self, PyObject *other, int result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -6518,215 +6679,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__GroupInfo_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__GroupInfo_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.tags.GroupInfo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.tags.GroupInfo", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__GroupInfo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__GroupInfo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__GroupInfo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__GroupInfo_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__GroupInfo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__GroupInfo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__GroupInfo_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__GroupInfo_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " The details of an Exif group. Groups include IFDs and binary arrays.",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__GroupInfo_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_GroupInfo___iter___getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__GroupInfo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__GroupInfo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "The details of an Exif group. Groups include IFDs and binary arrays.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__GroupInfo_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_GroupInfo___iter___getiterfunc_closure, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__GroupInfo_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__GroupInfo_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - _wrap_GroupInfo___getitem__, /* mp_subscript */ - _wrap_GroupInfo___setitem___objobjargproc_closure, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + _wrap_GroupInfo___getitem__, /* mp_subscript */ + _wrap_GroupInfo___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__GroupInfo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__GroupInfo_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__GroupInfo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__GroupInfo_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'GroupInfo'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__GroupInfo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"The details of an Exif group. Groups include IFDs and binary arrays." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__GroupInfo_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__GroupInfo_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__GroupInfo_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)_wrap_GroupInfo___getitem__ }, + { Py_mp_ass_subscript, (void *)_wrap_GroupInfo___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_GroupInfo___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.tags.GroupInfo", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__GroupInfo_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet TagInfo_tag__getset = { _wrap_TagInfo_tag__get, 0 }; static SwigPyGetSet TagInfo_title__getset = { _wrap_TagInfo_title__get, 0 }; @@ -6738,15 +7015,15 @@ static SwigPyGetSet TagInfo___dict___getset = { SwigPyObject_get___dict__, 0 }; static SwigPyGetSet TagInfo_count__getset = { _wrap_TagInfo_count__get, 0 }; static SwigPyGetSet TagInfo_name__getset = { _wrap_TagInfo_name__get, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__TagInfo_getset[] = { - { (char *)"tag_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Tag", &TagInfo_tag__getset }, - { (char *)"title_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Tag title", &TagInfo_title__getset }, - { (char *)"sectionId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Section id", &TagInfo_sectionId__getset }, - { (char *)"desc_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Short tag description", &TagInfo_desc__getset }, - { (char *)"typeId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Type id", &TagInfo_typeId__getset }, - { (char *)"ifdId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Link to the (preferred) IFD", &TagInfo_ifdId__getset }, - { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Tag", &TagInfo___dict___getset }, - { (char *)"count_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" The number of values (not bytes!), 0=any, -1=count not known.", &TagInfo_count__getset }, - { (char *)"name_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" One word tag label", &TagInfo_name__getset }, + { (char *)"tag_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Tag", &TagInfo_tag__getset }, + { (char *)"title_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Tag title", &TagInfo_title__getset }, + { (char *)"sectionId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Section id", &TagInfo_sectionId__getset }, + { (char *)"desc_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Short tag description", &TagInfo_desc__getset }, + { (char *)"typeId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Type id", &TagInfo_typeId__getset }, + { (char *)"ifdId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Link to the (preferred) IFD", &TagInfo_ifdId__getset }, + { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Tag", &TagInfo___dict___getset }, + { (char *)"count_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"The number of values (not bytes!), 0=any, -1=count not known.", &TagInfo_count__getset }, + { (char *)"name_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"One word tag label", &TagInfo_name__getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -6758,7 +7035,7 @@ SwigPyBuiltin__Exiv2__TagInfo_richcompare(PyObject *self, PyObject *other, int o result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -6788,219 +7065,335 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__TagInfo_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__TagInfo_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.tags.TagInfo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.tags.TagInfo", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__TagInfo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__TagInfo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__TagInfo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__TagInfo_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__TagInfo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__TagInfo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__TagInfo_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__TagInfo_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Tag information", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__TagInfo_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_TagInfo___iter___getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__TagInfo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__TagInfo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Tag information", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__TagInfo_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_TagInfo___iter___getiterfunc_closure, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__TagInfo_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__TagInfo_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - _wrap_TagInfo___getitem__, /* mp_subscript */ - _wrap_TagInfo___setitem___objobjargproc_closure, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + _wrap_TagInfo___getitem__, /* mp_subscript */ + _wrap_TagInfo___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__TagInfo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__TagInfo_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__TagInfo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__TagInfo_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'TagInfo'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__TagInfo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Tag information" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__TagInfo_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__TagInfo_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__TagInfo_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)_wrap_TagInfo___getitem__ }, + { Py_mp_ass_subscript, (void *)_wrap_TagInfo___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_TagInfo___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.tags.TagInfo", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__TagInfo_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet ExifTags___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ExifTags_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Return read-only list of built-in groups", &ExifTags___dict___getset }, + { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Return read-only list of built-in groups", &ExifTags___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -7012,19 +7405,19 @@ SwigPyBuiltin__Exiv2__ExifTags_richcompare(PyObject *self, PyObject *other, int result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; } SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ExifTags_methods[] = { - { "groupList", (PyCFunction)(void(*)(void))_wrap_ExifTags_groupList, METH_STATIC|METH_NOARGS, " Return read-only list of built-in groups" }, - { "tagList", (PyCFunction)(void(*)(void))_wrap_ExifTags_tagList, METH_STATIC|METH_O, " Return read-only list of built-in *groupName* tags." }, - { "sectionName", (PyCFunction)(void(*)(void))_wrap_ExifTags_sectionName, METH_STATIC|METH_O, " Return the name of the section for an Exif *key*." }, - { "defaultCount", (PyCFunction)(void(*)(void))_wrap_ExifTags_defaultCount, METH_STATIC|METH_O, " Return the default number of components (not bytes!) *key* has. (0=any, -1=count not known)" }, - { "ifdName", (PyCFunction)(void(*)(void))_wrap_ExifTags_ifdName, METH_STATIC|METH_O, " Return the name of the IFD for the group." }, - { "isMakerGroup", (PyCFunction)(void(*)(void))_wrap_ExifTags_isMakerGroup, METH_STATIC|METH_O, " Return true if *groupName* is a makernote group." }, + { "groupList", (PyCFunction)(void(*)(void))_wrap_ExifTags_groupList, METH_STATIC|METH_NOARGS, "Return read-only list of built-in groups" }, + { "tagList", (PyCFunction)(void(*)(void))_wrap_ExifTags_tagList, METH_STATIC|METH_O, "Return read-only list of built-in *groupName* tags." }, + { "sectionName", (PyCFunction)(void(*)(void))_wrap_ExifTags_sectionName, METH_STATIC|METH_O, "Return the name of the section for an Exif *key*." }, + { "defaultCount", (PyCFunction)(void(*)(void))_wrap_ExifTags_defaultCount, METH_STATIC|METH_O, "Return the default number of components (not bytes!) *key* has. (0=any, -1=count not known)" }, + { "ifdName", (PyCFunction)(void(*)(void))_wrap_ExifTags_ifdName, METH_STATIC|METH_O, "Return the name of the IFD for the group." }, + { "isMakerGroup", (PyCFunction)(void(*)(void))_wrap_ExifTags_isMakerGroup, METH_STATIC|METH_O, "Return true if *groupName* is a makernote group." }, { "isExifGroup", (PyCFunction)(void(*)(void))_wrap_ExifTags_isExifGroup, METH_STATIC|METH_O, "\n" "Return true if *groupName* is a TIFF or Exif IFD, else false.\n" " This is used to differentiate between standard Exif IFDs\n" @@ -7033,215 +7426,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ExifTags_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ExifTags_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.tags.ExifTags", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.tags.ExifTags", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ExifTags_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__ExifTags_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ExifTags_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ExifTags_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ExifTags_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ExifTags_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__ExifTags_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ExifTags_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Access to Exif group and tag lists and misc. tag reference methods, implemented as a static class.",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ExifTags_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ExifTags_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ExifTags_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Access to Exif group and tag lists and misc. tag reference methods, implemented as a static class.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ExifTags_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ExifTags_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ExifTags_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ExifTags_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifTags_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ExifTags_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifTags_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifTags'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ExifTags_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Access to Exif group and tag lists and misc. tag reference methods, implemented as a static class." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ExifTags_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ExifTags_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ExifTags_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.tags.ExifTags", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ExifTags_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet ExifKey___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ExifKey_getset[] = { @@ -7286,236 +7795,352 @@ SwigPyBuiltin__Exiv2__ExifKey_richcompare(PyObject *self, PyObject *other, int o result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; } SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ExifKey_methods[] = { - { "setIdx", _wrap_ExifKey_setIdx, METH_O, " Set the index." }, + { "setIdx", _wrap_ExifKey_setIdx, METH_O, "Set the index." }, { "key", _wrap_ExifKey_key, METH_NOARGS, "" }, { "familyName", _wrap_ExifKey_familyName, METH_NOARGS, "" }, { "groupName", _wrap_ExifKey_groupName, METH_NOARGS, "" }, { "tagName", _wrap_ExifKey_tagName, METH_NOARGS, "" }, { "tag", _wrap_ExifKey_tag, METH_NOARGS, "" }, { "tagLabel", _wrap_ExifKey_tagLabel, METH_NOARGS, "" }, - { "tagDesc", _wrap_ExifKey_tagDesc, METH_NOARGS, " Return the tag description." }, - { "defaultTypeId", _wrap_ExifKey_defaultTypeId, METH_NOARGS, " Return the default type id for this tag." }, + { "tagDesc", _wrap_ExifKey_tagDesc, METH_NOARGS, "Return the tag description." }, + { "defaultTypeId", _wrap_ExifKey_defaultTypeId, METH_NOARGS, "Return the default type id for this tag." }, { "clone", _wrap_ExifKey_clone, METH_NOARGS, "" }, - { "idx", _wrap_ExifKey_idx, METH_NOARGS, " Return the index (unique id of this key within the original Exif data, 0 if not set)" }, + { "idx", _wrap_ExifKey_idx, METH_NOARGS, "Return the index (unique id of this key within the original Exif data, 0 if not set)" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ExifKey_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.tags.ExifKey", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_ExifKey_destructor_closure, /* tp_dealloc */ + "exiv2.tags.ExifKey", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_ExifKey_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ExifKey_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__ExifKey_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ExifKey_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - _wrap_ExifKey_key_reprfunc_closure, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ExifKey_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ExifKey_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ExifKey_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__ExifKey_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + _wrap_ExifKey_key_reprfunc_closure, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ExifKey_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Concrete keys for Exif metadata and access to Exif tag reference data.",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ExifKey_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ExifKey_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ExifKey_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_ExifKey, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Concrete keys for Exif metadata and access to Exif tag reference data.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ExifKey_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ExifKey_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ExifKey_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_ExifKey, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ExifKey_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifKey_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ExifKey_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifKey_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifKey'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ExifKey_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_ExifKey }, + { Py_tp_dealloc, (void *)_wrap_delete_ExifKey_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Concrete keys for Exif metadata and access to Exif tag reference data." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)_wrap_ExifKey_key_reprfunc_closure }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ExifKey_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ExifKey_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ExifKey_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.tags.ExifKey", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ExifKey_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -8080,7 +8705,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -8263,7 +8888,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -8289,102 +8914,87 @@ SWIG_init(void) { /* type '::_TagListFct' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin___TagListFct_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type '_TagListFct'."); + builtin_pytype = SwigPyBuiltin___TagListFct_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin___TagListFct_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "_TagListFct", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "_TagListFct"); d = md; /* type 'Exiv2::GroupInfo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__GroupInfo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'GroupInfo'."); + builtin_pytype = SwigPyBuiltin__Exiv2__GroupInfo_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__GroupInfo_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "GroupInfo", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "GroupInfo"); d = md; /* type 'Exiv2::TagInfo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__TagInfo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'TagInfo'."); + builtin_pytype = SwigPyBuiltin__Exiv2__TagInfo_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__TagInfo_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "TagInfo", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "TagInfo"); d = md; /* type 'Exiv2::ExifTags' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifTags_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifTags'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ExifTags_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ExifTags_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "ExifTags", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "ExifTags"); d = md; /* type 'Exiv2::ExifKey' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifKey_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Key"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -8398,18 +9008,18 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifKey'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ExifKey_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ExifKey_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "ExifKey", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "ExifKey"); d = md; diff --git a/src/swig-0_27_7/types.py b/src/swig-0_27_7/types.py index 78bbe150..a34e6fec 100644 --- a/src/swig-0_27_7/types.py +++ b/src/swig-0_27_7/types.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_27_7/types_wrap.cxx b/src/swig-0_27_7/types_wrap.cxx index 2cb304dd..7bd9bf4e 100644 --- a/src/swig-0_27_7/types_wrap.cxx +++ b/src/swig-0_27_7/types_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_types" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -3970,7 +4022,6 @@ static swig_module_info swig_module = {swig_types, 16, 0, 0, 0, 0}; # define SWIG_init init_types #endif -#define SWIG_name "_types" #ifdef __cplusplus #include @@ -4040,7 +4091,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4048,7 +4099,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4056,8 +4107,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4066,7 +4117,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4089,7 +4140,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4103,11 +4154,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4278,7 +4327,7 @@ static void _set_python_exception() { - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4367,7 +4416,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -4390,10 +4439,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -4593,12 +4642,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -5368,7 +5413,7 @@ SwigPython_std_pair_repr (PyObject *o) PyTuple_SET_ITEM(tuple, 0, PyObject_GetAttrString(o, (char*) "first")); PyTuple_SET_ITEM(tuple, 1, PyObject_GetAttrString(o, (char*) "second")); PyObject *result = PyObject_Repr(tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -5540,7 +5585,7 @@ SWIGINTERN PyObject *_wrap_TypeInfo_typeId(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TypeInfo_typeId" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TypeInfo_typeId" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "TypeInfo_typeId" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5737,7 +5782,7 @@ SWIGINTERN int _wrap_new_DataBuf__SWIG_3(PyObject *self, Py_ssize_t nobjs, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DataBuf" "', argument " "1"" of type '" "Exiv2::DataBuf &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DataBuf" "', argument " "1"" of type '" "Exiv2::DataBuf &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_DataBuf" "', argument " "1"" of type '" "Exiv2::DataBuf &""'"); } arg1 = reinterpret_cast< Exiv2::DataBuf * >(argp1); { @@ -6045,7 +6090,7 @@ SWIGINTERN PyObject *_wrap_DataBuf___eq__(PyObject *self, PyObject *args) { return NULL; } PyErr_Clear(); - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } @@ -6101,7 +6146,7 @@ SWIGINTERN PyObject *_wrap_DataBuf___ne__(PyObject *self, PyObject *args) { return NULL; } PyErr_Clear(); - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } @@ -6293,7 +6338,7 @@ SWIGINTERN int _wrap_new_URational__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_URational" "', argument " "1"" of type '" "std::pair< uint32_t,uint32_t > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_URational" "', argument " "1"" of type '" "std::pair< uint32_t,uint32_t > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_URational" "', argument " "1"" of type '" "std::pair< uint32_t,uint32_t > const &""'"); } arg1 = ptr; } @@ -6555,7 +6600,7 @@ SWIGINTERN int _wrap_new_Rational__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Rational" "', argument " "1"" of type '" "std::pair< int32_t,int32_t > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Rational" "', argument " "1"" of type '" "std::pair< int32_t,int32_t > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_Rational" "', argument " "1"" of type '" "std::pair< int32_t,int32_t > const &""'"); } arg1 = ptr; } @@ -6768,228 +6813,344 @@ SwigPyBuiltin__Exiv2__TypeInfo_richcompare(PyObject *self, PyObject *other, int result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; } SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__TypeInfo_methods[] = { - { "typeName", (PyCFunction)(void(*)(void))_wrap_TypeInfo_typeName, METH_STATIC|METH_O, " Return the name of the type, 0 if unknown." }, - { "typeId", (PyCFunction)(void(*)(void))_wrap_TypeInfo_typeId, METH_STATIC|METH_O, " Return the type id for a type name" }, - { "typeSize", (PyCFunction)(void(*)(void))_wrap_TypeInfo_typeSize, METH_STATIC|METH_O, " Return the size in bytes of one element of this type" }, + { "typeName", (PyCFunction)(void(*)(void))_wrap_TypeInfo_typeName, METH_STATIC|METH_O, "Return the name of the type, 0 if unknown." }, + { "typeId", (PyCFunction)(void(*)(void))_wrap_TypeInfo_typeId, METH_STATIC|METH_O, "Return the type id for a type name" }, + { "typeSize", (PyCFunction)(void(*)(void))_wrap_TypeInfo_typeSize, METH_STATIC|METH_O, "Return the size in bytes of one element of this type" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__TypeInfo_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.types.TypeInfo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ + "exiv2.types.TypeInfo", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ _wrap_delete_TypeInfo_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__TypeInfo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__TypeInfo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__TypeInfo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__TypeInfo_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__TypeInfo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__TypeInfo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__TypeInfo_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__TypeInfo_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Type information lookup functions. Implemented as a static class.",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__TypeInfo_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__TypeInfo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__TypeInfo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Type information lookup functions. Implemented as a static class.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__TypeInfo_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__TypeInfo_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__TypeInfo_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__TypeInfo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__TypeInfo_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__TypeInfo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__TypeInfo_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'TypeInfo'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__TypeInfo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete_TypeInfo_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Type information lookup functions. Implemented as a static class." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__TypeInfo_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__TypeInfo_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__TypeInfo_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.types.TypeInfo", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__TypeInfo_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet DataBuf_pData__getset = { _wrap_DataBuf_pData__get, 0 }; static SwigPyGetSet DataBuf_size__getset = { _wrap_DataBuf_size__get, 0 }; @@ -7002,7 +7163,7 @@ SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__DataBuf_getset[] = { "\n" ":rtype: memoryview\n" "", &DataBuf_pData__getset }, - { (char *)"size_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" The current size of the buffer", &DataBuf_size__getset }, + { (char *)"size_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"The current size of the buffer", &DataBuf_size__getset }, { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"\n" "*Overload 1:*\n" "Default constructor\n" @@ -7041,7 +7202,7 @@ SwigPyBuiltin__Exiv2__DataBuf_richcompare(PyObject *self, PyObject *other, int o result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -7053,8 +7214,8 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DataBuf_methods[] = { " the requested *size* is less than the current buffer size, no\n" " new memory is allocated and the buffer size doesn't change.\n" "" }, - { "free", _wrap_DataBuf_free, METH_NOARGS, " Free the internal buffer and reset the size to 0." }, - { "reset", _wrap_DataBuf_reset, METH_NOARGS, " Reset value" }, + { "free", _wrap_DataBuf_free, METH_NOARGS, "Free the internal buffer and reset the size to 0." }, + { "reset", _wrap_DataBuf_reset, METH_NOARGS, "Reset value" }, { "__len__", _wrap_DataBuf___len__, METH_NOARGS, "" }, { "__eq__", _wrap_DataBuf___eq__, METH_O, "" }, { "__ne__", _wrap_DataBuf___ne__, METH_O, "" }, @@ -7070,42 +7231,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DataBuf_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__DataBuf_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.types.DataBuf", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_DataBuf_destructor_closure, /* tp_dealloc */ + "exiv2.types.DataBuf", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_DataBuf_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__DataBuf_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__DataBuf_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__DataBuf_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__DataBuf_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__DataBuf_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__DataBuf_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__DataBuf_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__DataBuf_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -7114,176 +7276,296 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__DataBuf_type = { " care of memory allocation and deletion. Its primary use is meant to\n" " be as a stack variable in functions that need a temporary data\n" " buffer.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__DataBuf_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__DataBuf_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__DataBuf_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_DataBuf, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__DataBuf_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__DataBuf_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__DataBuf_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_DataBuf, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - _wrap_DataBuf___getitem__, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + _wrap_DataBuf___getitem__, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_DataBuf___len___lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + _wrap_DataBuf___len___lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - getbuffer_Exiv2_DataBuf, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + getbuffer_Exiv2_DataBuf, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__DataBuf_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__DataBuf_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__DataBuf_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__DataBuf_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'DataBuf'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__DataBuf_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_DataBuf }, + { Py_tp_dealloc, (void *)_wrap_delete_DataBuf_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Utility class containing a character array. All it does is to take\n" + " care of memory allocation and deletion. Its primary use is meant to\n" + " be as a stack variable in functions that need a temporary data\n" + " buffer.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__DataBuf_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__DataBuf_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__DataBuf_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)_wrap_DataBuf___getitem__ }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_DataBuf___len___lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.types.DataBuf", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__DataBuf_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet URational_first_getset = { _wrap_URational_first_get, _wrap_URational_first_set }; static SwigPyGetSet URational___dict___getset = { SwigPyObject_get___dict__, 0 }; @@ -7306,7 +7588,7 @@ SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_richcompare(PyObject *self, PyObje result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -7316,215 +7598,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_methods[] = { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.types.URational", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_URational_destructor_closure,/* tp_dealloc */ + "exiv2.types.URational", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_URational_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - SwigPython_std_pair_repr, /* tp_repr */ - &SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type.as_number,/* tp_as_number */ - &SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type.as_sequence,/* tp_as_sequence */ - &SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type.as_mapping,/* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type.as_buffer,/* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + SwigPython_std_pair_repr, /* tp_repr */ + &SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - "std::pair< uint32_t,uint32_t >", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_URational, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "std::pair< uint32_t,uint32_t >", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_URational, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - SwigPython_std_pair_len, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - SwigPython_std_pair_getitem, /* sq_item */ + SwigPython_std_pair_len, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + SwigPython_std_pair_getitem, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - SwigPython_std_pair_setitem, /* sq_ass_item */ + SwigPython_std_pair_setitem, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type}; +static PyTypeObject *SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'URational'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_URational }, + { Py_tp_dealloc, (void *)_wrap_delete_URational_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"std::pair< uint32_t,uint32_t >" }, + { Py_tp_repr, (void *)SwigPython_std_pair_repr }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)SwigPython_std_pair_len }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)SwigPython_std_pair_getitem }, + { Py_sq_ass_item, (void *)SwigPython_std_pair_setitem }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.types.URational", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet Rational_first_getset = { _wrap_Rational_first_get, _wrap_Rational_first_set }; static SwigPyGetSet Rational___dict___getset = { SwigPyObject_get___dict__, 0 }; @@ -7544,7 +7942,7 @@ SwigPyBuiltin__std__pairT_int32_t_int32_t_t_richcompare(PyObject *self, PyObject result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -7554,215 +7952,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__std__pairT_int32_t_int32_t_t_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.types.Rational", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ + "exiv2.types.Rational", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ _wrap_delete_Rational_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ + (cmpfunc) 0, /* tp_compare */ #endif - SwigPython_std_pair_repr, /* tp_repr */ - &SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type.as_sequence,/* tp_as_sequence */ + SwigPython_std_pair_repr, /* tp_repr */ + &SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type.as_sequence, /* tp_as_sequence */ &SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type.as_buffer, /* tp_as_buffer */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - "std::pair< int32_t,int32_t >", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__std__pairT_int32_t_int32_t_t_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__std__pairT_int32_t_int32_t_t_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__std__pairT_int32_t_int32_t_t_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_Rational, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "std::pair< int32_t,int32_t >", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__std__pairT_int32_t_int32_t_t_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__std__pairT_int32_t_int32_t_t_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__std__pairT_int32_t_int32_t_t_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_Rational, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - SwigPython_std_pair_len, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - SwigPython_std_pair_getitem, /* sq_item */ + SwigPython_std_pair_len, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + SwigPython_std_pair_getitem, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - SwigPython_std_pair_setitem, /* sq_ass_item */ + SwigPython_std_pair_setitem, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__std__pairT_int32_t_int32_t_t_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type}; +static PyTypeObject *SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Rational'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_Rational }, + { Py_tp_dealloc, (void *)_wrap_delete_Rational_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"std::pair< int32_t,int32_t >" }, + { Py_tp_repr, (void *)SwigPython_std_pair_repr }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__std__pairT_int32_t_int32_t_t_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__std__pairT_int32_t_int32_t_t_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__std__pairT_int32_t_int32_t_t_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)SwigPython_std_pair_len }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)SwigPython_std_pair_getitem }, + { Py_sq_ass_item, (void *)SwigPython_std_pair_setitem }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.types.Rational", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__std__pairT_int32_t_int32_t_t_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -8113,7 +8627,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -8296,7 +8810,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -8343,93 +8857,81 @@ SWIG_init(void) { "\nexiv2.Value.create(). 0x0000 to 0xffff are reserved for TIFF (Exif) types.", _get_enum_list(0, "unsignedByte",Exiv2::unsignedByte,"asciiString",Exiv2::asciiString,"unsignedShort",Exiv2::unsignedShort,"unsignedLong",Exiv2::unsignedLong,"unsignedRational",Exiv2::unsignedRational,"signedByte",Exiv2::signedByte,"undefined",Exiv2::undefined,"signedShort",Exiv2::signedShort,"signedLong",Exiv2::signedLong,"signedRational",Exiv2::signedRational,"tiffFloat",Exiv2::tiffFloat,"tiffDouble",Exiv2::tiffDouble,"tiffIfd",Exiv2::tiffIfd,"string",Exiv2::string,"date",Exiv2::date,"time",Exiv2::time,"comment",Exiv2::comment,"directory",Exiv2::directory,"xmpText",Exiv2::xmpText,"xmpAlt",Exiv2::xmpAlt,"xmpBag",Exiv2::xmpBag,"xmpSeq",Exiv2::xmpSeq,"langAlt",Exiv2::langAlt,"invalidTypeId",Exiv2::invalidTypeId,"lastTypeId",Exiv2::lastTypeId, NULL))); /* type 'Exiv2::TypeInfo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__TypeInfo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'TypeInfo'."); + builtin_pytype = SwigPyBuiltin__Exiv2__TypeInfo_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__TypeInfo_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "TypeInfo", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "TypeInfo"); d = md; /* type 'Exiv2::DataBuf' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__DataBuf_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'DataBuf'."); + builtin_pytype = SwigPyBuiltin__Exiv2__DataBuf_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__DataBuf_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "DataBuf", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "DataBuf"); d = md; /* type 'std::pair< uint32_t,uint32_t >' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'URational'."); + builtin_pytype = SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "URational", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "URational"); d = md; /* type 'std::pair< int32_t,int32_t >' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'Rational'."); + builtin_pytype = SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__std__pairT_int32_t_int32_t_t_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "Rational", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "Rational"); d = md; diff --git a/src/swig-0_27_7/value.py b/src/swig-0_27_7/value.py index d2149e27..cac5373a 100644 --- a/src/swig-0_27_7/value.py +++ b/src/swig-0_27_7/value.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_27_7/value_wrap.cxx b/src/swig-0_27_7/value_wrap.cxx index 46325b8a..c526e774 100644 --- a/src/swig-0_27_7/value_wrap.cxx +++ b/src/swig-0_27_7/value_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_value" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -4006,7 +4058,6 @@ static swig_module_info swig_module = {swig_types, 49, 0, 0, 0, 0}; # define SWIG_init init_value #endif -#define SWIG_name "_value" #ifdef __cplusplus #include @@ -4076,7 +4127,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4084,7 +4135,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4092,8 +4143,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4102,7 +4153,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4125,7 +4176,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4139,11 +4190,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4320,12 +4369,7 @@ namespace swig { } static swig_type_info* descriptor() { - static int init = 0; - static swig_type_info* desc = 0; - if (!init) { - desc = SWIG_TypeQuery("swig::SwigPyIterator *"); - init = 1; - } + static swig_type_info* desc = SWIG_TypeQuery("swig::SwigPyIterator *"); return desc; } }; @@ -4333,7 +4377,7 @@ namespace swig { #if defined(SWIGPYTHON_BUILTIN) inline PyObject* make_output_iterator_builtin (PyObject *pyself) { - Py_INCREF(pyself); + SWIG_Py_INCREF(pyself); return pyself; } #endif @@ -4462,7 +4506,7 @@ static void _set_python_exception() { - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -5138,7 +5182,7 @@ namespace swig { template <> struct traits_from { typedef PyObject * value_type; static PyObject *from(const value_type& val) { - Py_XINCREF(val); + SWIG_Py_XINCREF(val); return val; } }; @@ -5568,7 +5612,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -5591,10 +5635,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -5629,12 +5673,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -5928,7 +5968,7 @@ SwigPython_std_pair_repr (PyObject *o) PyTuple_SET_ITEM(tuple, 0, PyObject_GetAttrString(o, (char*) "first")); PyTuple_SET_ITEM(tuple, 1, PyObject_GetAttrString(o, (char*) "second")); PyObject *result = PyObject_Repr(tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -7700,7 +7740,7 @@ SWIGINTERN PyObject *_wrap_Value_read__SWIG_1(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Value_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Value_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Value_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -8676,7 +8716,7 @@ SWIGINTERN PyObject *_wrap_DataValue_read__SWIG_1(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DataValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "DataValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9118,7 +9158,7 @@ SWIGINTERN int _wrap_new_DataValue__SWIG_2(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DataValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DataValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_DataValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -9219,7 +9259,7 @@ SWIGINTERN PyObject *_wrap_StringValueBase_read__SWIG_0(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringValueBase_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringValueBase_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "StringValueBase_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9779,7 +9819,7 @@ SWIGINTERN int _wrap_new_StringValue__SWIG_1(PyObject *self, PyObject *args, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StringValue" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringValue" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_StringValue" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -9867,7 +9907,7 @@ SWIGINTERN int _wrap_new_StringValue__SWIG_2(PyObject *self, PyObject *args, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StringValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_StringValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -10069,7 +10109,7 @@ SWIGINTERN PyObject *_wrap_AsciiValue_read__SWIG_1(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AsciiValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AsciiValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "AsciiValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -10224,7 +10264,7 @@ SWIGINTERN int _wrap_new_AsciiValue__SWIG_1(PyObject *self, PyObject *args, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AsciiValue" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AsciiValue" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_AsciiValue" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -10261,7 +10301,7 @@ SWIGINTERN int _wrap_new_AsciiValue__SWIG_2(PyObject *self, PyObject *args, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AsciiValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AsciiValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_AsciiValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -10366,7 +10406,7 @@ SWIGINTERN int _wrap_new_CommentValue__SWIG_1(PyObject *self, PyObject *args, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CommentValue" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CommentValue" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_CommentValue" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -10431,7 +10471,7 @@ SWIGINTERN PyObject *_wrap_CommentValue_read__SWIG_0(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CommentValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CommentValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "CommentValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -10847,7 +10887,7 @@ SWIGINTERN PyObject *_wrap_CommentValue_detectCharset(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CommentValue_detectCharset" "', argument " "2"" of type '" "std::string &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CommentValue_detectCharset" "', argument " "2"" of type '" "std::string &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "CommentValue_detectCharset" "', argument " "2"" of type '" "std::string &""'"); } arg2 = ptr; } @@ -10977,7 +11017,7 @@ SWIGINTERN int _wrap_new_CommentValue__SWIG_2(PyObject *self, PyObject *args, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CommentValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CommentValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_CommentValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -11412,7 +11452,7 @@ SWIGINTERN PyObject *_wrap_XmpValue_read__SWIG_1(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -11513,7 +11553,7 @@ SWIGINTERN int _wrap_new_XmpTextValue__SWIG_1(PyObject *self, PyObject *args, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XmpTextValue" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XmpTextValue" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_XmpTextValue" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -11628,7 +11668,7 @@ SWIGINTERN PyObject *_wrap_XmpTextValue_read__SWIG_1(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpTextValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpTextValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpTextValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -11953,7 +11993,7 @@ SWIGINTERN int _wrap_new_XmpTextValue__SWIG_2(PyObject *self, PyObject *args, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XmpTextValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XmpTextValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_XmpTextValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -12196,7 +12236,7 @@ SWIGINTERN PyObject *_wrap_XmpArrayValue_read__SWIG_1(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpArrayValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpArrayValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpArrayValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -12538,7 +12578,7 @@ SWIGINTERN int _wrap_new_XmpArrayValue__SWIG_0(PyObject *self, PyObject *args, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XmpArrayValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XmpArrayValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_XmpArrayValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -12838,7 +12878,7 @@ SWIGINTERN int _wrap_new_LangAltValue__SWIG_1(PyObject *self, PyObject *args, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LangAltValue" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LangAltValue" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_LangAltValue" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -12953,7 +12993,7 @@ SWIGINTERN PyObject *_wrap_LangAltValue_read__SWIG_1(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LangAltValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LangAltValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "LangAltValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -13129,7 +13169,7 @@ SWIGINTERN PyObject *_wrap_LangAltValue_toString__SWIG_1(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LangAltValue_toString" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LangAltValue_toString" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "LangAltValue_toString" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -13508,7 +13548,7 @@ SWIGINTERN PyObject *_wrap_LangAltValue___getitem__(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LangAltValue___getitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LangAltValue___getitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "LangAltValue___getitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -13551,7 +13591,7 @@ SWIGINTERN PyObject *_wrap_LangAltValue___setitem__(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LangAltValue___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LangAltValue___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "LangAltValue___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -13597,7 +13637,7 @@ SWIGINTERN PyObject *_wrap_LangAltValue___contains__(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LangAltValue___contains__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LangAltValue___contains__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "LangAltValue___contains__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -13626,7 +13666,7 @@ SWIGINTERN int _wrap_new_LangAltValue__SWIG_3(PyObject *self, PyObject *args, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LangAltValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LangAltValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_LangAltValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -13919,7 +13959,7 @@ SWIGINTERN PyObject *_wrap_DateValue_read__SWIG_1(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DateValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DateValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "DateValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -14003,7 +14043,7 @@ SWIGINTERN PyObject *_wrap_DateValue_setDate__SWIG_0(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DateValue_setDate" "', argument " "2"" of type '" "Exiv2::DateValue::Date const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DateValue_setDate" "', argument " "2"" of type '" "Exiv2::DateValue::Date const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "DateValue_setDate" "', argument " "2"" of type '" "Exiv2::DateValue::Date const &""'"); } arg2 = reinterpret_cast< Exiv2::DateValue::Date * >(argp2); { @@ -14392,7 +14432,7 @@ SWIGINTERN int _wrap_new_DateValue__SWIG_2(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DateValue" "', argument " "1"" of type '" "Exiv2::DateValue::Date &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DateValue" "', argument " "1"" of type '" "Exiv2::DateValue::Date &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_DateValue" "', argument " "1"" of type '" "Exiv2::DateValue::Date &""'"); } arg1 = reinterpret_cast< Exiv2::DateValue::Date * >(argp1); { @@ -14516,7 +14556,7 @@ SWIGINTERN int _wrap_new_DateValue__SWIG_3(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DateValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DateValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_DateValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -14961,7 +15001,7 @@ SWIGINTERN PyObject *_wrap_Date___getitem__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Date___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Date___getitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Date___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -15015,7 +15055,7 @@ SWIGINTERN PyObject *_wrap_Date___setitem__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Date___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Date___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Date___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -15293,7 +15333,7 @@ SWIGINTERN PyObject *_wrap_TimeValue_read__SWIG_1(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TimeValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TimeValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "TimeValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -15377,7 +15417,7 @@ SWIGINTERN PyObject *_wrap_TimeValue_setTime__SWIG_0(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TimeValue_setTime" "', argument " "2"" of type '" "Exiv2::TimeValue::Time const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TimeValue_setTime" "', argument " "2"" of type '" "Exiv2::TimeValue::Time const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "TimeValue_setTime" "', argument " "2"" of type '" "Exiv2::TimeValue::Time const &""'"); } arg2 = reinterpret_cast< Exiv2::TimeValue::Time * >(argp2); { @@ -15766,7 +15806,7 @@ SWIGINTERN int _wrap_new_TimeValue__SWIG_2(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TimeValue" "', argument " "1"" of type '" "Exiv2::TimeValue::Time &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TimeValue" "', argument " "1"" of type '" "Exiv2::TimeValue::Time &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_TimeValue" "', argument " "1"" of type '" "Exiv2::TimeValue::Time &""'"); } arg1 = reinterpret_cast< Exiv2::TimeValue::Time * >(argp1); { @@ -15923,7 +15963,7 @@ SWIGINTERN int _wrap_new_TimeValue__SWIG_3(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TimeValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TimeValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_TimeValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -16483,7 +16523,7 @@ SWIGINTERN PyObject *_wrap_Time___getitem__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Time___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Time___getitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Time___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -16537,7 +16577,7 @@ SWIGINTERN PyObject *_wrap_Time___setitem__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Time___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Time___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Time___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -16786,7 +16826,7 @@ SWIGINTERN int _wrap_new_UShortValue__SWIG_3(PyObject *self, PyObject *args, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UShortValue" "', argument " "1"" of type '" "Exiv2::ValueType< unsigned short > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UShortValue" "', argument " "1"" of type '" "Exiv2::ValueType< unsigned short > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_UShortValue" "', argument " "1"" of type '" "Exiv2::ValueType< unsigned short > const &""'"); } arg1 = reinterpret_cast< Exiv2::ValueType< unsigned short > * >(argp1); { @@ -16921,7 +16961,7 @@ SWIGINTERN PyObject *_wrap_UShortValue_read__SWIG_1(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UShortValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UShortValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "UShortValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -17463,7 +17503,7 @@ SWIGINTERN int _wrap_new_UShortValue__SWIG_4(PyObject *self, PyObject *args, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UShortValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UShortValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_UShortValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -17670,7 +17710,7 @@ SWIGINTERN PyObject *_wrap_UShortValue___setitem__(PyObject *self, PyObject *arg arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_unsigned_short,0))))) { - unsigned short val; + unsigned short val; int ecode = SWIG_AsVal_unsigned_SS_short(obj2, &val); if (!SWIG_IsOK(ecode)) { SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "UShortValue___setitem__" "', argument " "3"" of type '" "uint16_t""'"); @@ -17921,7 +17961,7 @@ SWIGINTERN int _wrap_new_ULongValue__SWIG_3(PyObject *self, PyObject *args, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ULongValue" "', argument " "1"" of type '" "Exiv2::ValueType< unsigned int > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ULongValue" "', argument " "1"" of type '" "Exiv2::ValueType< unsigned int > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_ULongValue" "', argument " "1"" of type '" "Exiv2::ValueType< unsigned int > const &""'"); } arg1 = reinterpret_cast< Exiv2::ValueType< unsigned int > * >(argp1); { @@ -18056,7 +18096,7 @@ SWIGINTERN PyObject *_wrap_ULongValue_read__SWIG_1(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ULongValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ULongValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ULongValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -18598,7 +18638,7 @@ SWIGINTERN int _wrap_new_ULongValue__SWIG_4(PyObject *self, PyObject *args, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ULongValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ULongValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_ULongValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -18805,7 +18845,7 @@ SWIGINTERN PyObject *_wrap_ULongValue___setitem__(PyObject *self, PyObject *args arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_unsigned_int,0))))) { - unsigned int val; + unsigned int val; int ecode = SWIG_AsVal_unsigned_SS_int(obj2, &val); if (!SWIG_IsOK(ecode)) { SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "ULongValue___setitem__" "', argument " "3"" of type '" "uint32_t""'"); @@ -19009,7 +19049,7 @@ SWIGINTERN int _wrap_new_URationalValue__SWIG_2(PyObject *self, PyObject *args, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_URationalValue" "', argument " "1"" of type '" "std::pair< unsigned int,unsigned int > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_URationalValue" "', argument " "1"" of type '" "std::pair< unsigned int,unsigned int > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_URationalValue" "', argument " "1"" of type '" "std::pair< unsigned int,unsigned int > const &""'"); } arg1 = ptr; } @@ -19061,7 +19101,7 @@ SWIGINTERN int _wrap_new_URationalValue__SWIG_3(PyObject *self, PyObject *args, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_URationalValue" "', argument " "1"" of type '" "Exiv2::ValueType< std::pair< unsigned int,unsigned int > > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_URationalValue" "', argument " "1"" of type '" "Exiv2::ValueType< std::pair< unsigned int,unsigned int > > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_URationalValue" "', argument " "1"" of type '" "Exiv2::ValueType< std::pair< unsigned int,unsigned int > > const &""'"); } arg1 = reinterpret_cast< Exiv2::ValueType< std::pair< unsigned int,unsigned int > > * >(argp1); { @@ -19196,7 +19236,7 @@ SWIGINTERN PyObject *_wrap_URationalValue_read__SWIG_1(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "URationalValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "URationalValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "URationalValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -19738,7 +19778,7 @@ SWIGINTERN int _wrap_new_URationalValue__SWIG_4(PyObject *self, PyObject *args, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_URationalValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_URationalValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_URationalValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -20190,7 +20230,7 @@ SWIGINTERN int _wrap_new_ShortValue__SWIG_3(PyObject *self, PyObject *args, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ShortValue" "', argument " "1"" of type '" "Exiv2::ValueType< short > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ShortValue" "', argument " "1"" of type '" "Exiv2::ValueType< short > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_ShortValue" "', argument " "1"" of type '" "Exiv2::ValueType< short > const &""'"); } arg1 = reinterpret_cast< Exiv2::ValueType< short > * >(argp1); { @@ -20325,7 +20365,7 @@ SWIGINTERN PyObject *_wrap_ShortValue_read__SWIG_1(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShortValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ShortValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -20867,7 +20907,7 @@ SWIGINTERN int _wrap_new_ShortValue__SWIG_4(PyObject *self, PyObject *args, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ShortValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ShortValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_ShortValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -21074,7 +21114,7 @@ SWIGINTERN PyObject *_wrap_ShortValue___setitem__(PyObject *self, PyObject *args arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_short,0))))) { - short val; + short val; int ecode = SWIG_AsVal_short(obj2, &val); if (!SWIG_IsOK(ecode)) { SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "ShortValue___setitem__" "', argument " "3"" of type '" "int16_t""'"); @@ -21325,7 +21365,7 @@ SWIGINTERN int _wrap_new_LongValue__SWIG_3(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LongValue" "', argument " "1"" of type '" "Exiv2::ValueType< int > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LongValue" "', argument " "1"" of type '" "Exiv2::ValueType< int > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_LongValue" "', argument " "1"" of type '" "Exiv2::ValueType< int > const &""'"); } arg1 = reinterpret_cast< Exiv2::ValueType< int > * >(argp1); { @@ -21460,7 +21500,7 @@ SWIGINTERN PyObject *_wrap_LongValue_read__SWIG_1(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LongValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LongValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "LongValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -22002,7 +22042,7 @@ SWIGINTERN int _wrap_new_LongValue__SWIG_4(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LongValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LongValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_LongValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -22209,7 +22249,7 @@ SWIGINTERN PyObject *_wrap_LongValue___setitem__(PyObject *self, PyObject *args) arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_int,0))))) { - int val; + int val; int ecode = SWIG_AsVal_int(obj2, &val); if (!SWIG_IsOK(ecode)) { SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "LongValue___setitem__" "', argument " "3"" of type '" "int32_t""'"); @@ -22413,7 +22453,7 @@ SWIGINTERN int _wrap_new_RationalValue__SWIG_2(PyObject *self, PyObject *args, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RationalValue" "', argument " "1"" of type '" "std::pair< int,int > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RationalValue" "', argument " "1"" of type '" "std::pair< int,int > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_RationalValue" "', argument " "1"" of type '" "std::pair< int,int > const &""'"); } arg1 = ptr; } @@ -22465,7 +22505,7 @@ SWIGINTERN int _wrap_new_RationalValue__SWIG_3(PyObject *self, PyObject *args, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RationalValue" "', argument " "1"" of type '" "Exiv2::ValueType< std::pair< int,int > > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RationalValue" "', argument " "1"" of type '" "Exiv2::ValueType< std::pair< int,int > > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_RationalValue" "', argument " "1"" of type '" "Exiv2::ValueType< std::pair< int,int > > const &""'"); } arg1 = reinterpret_cast< Exiv2::ValueType< std::pair< int,int > > * >(argp1); { @@ -22600,7 +22640,7 @@ SWIGINTERN PyObject *_wrap_RationalValue_read__SWIG_1(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RationalValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RationalValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "RationalValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -23142,7 +23182,7 @@ SWIGINTERN int _wrap_new_RationalValue__SWIG_4(PyObject *self, PyObject *args, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RationalValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RationalValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_RationalValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -23594,7 +23634,7 @@ SWIGINTERN int _wrap_new_FloatValue__SWIG_3(PyObject *self, PyObject *args, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FloatValue" "', argument " "1"" of type '" "Exiv2::ValueType< float > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatValue" "', argument " "1"" of type '" "Exiv2::ValueType< float > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_FloatValue" "', argument " "1"" of type '" "Exiv2::ValueType< float > const &""'"); } arg1 = reinterpret_cast< Exiv2::ValueType< float > * >(argp1); { @@ -23729,7 +23769,7 @@ SWIGINTERN PyObject *_wrap_FloatValue_read__SWIG_1(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FloatValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FloatValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "FloatValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -24271,7 +24311,7 @@ SWIGINTERN int _wrap_new_FloatValue__SWIG_4(PyObject *self, PyObject *args, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FloatValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_FloatValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -24478,7 +24518,7 @@ SWIGINTERN PyObject *_wrap_FloatValue___setitem__(PyObject *self, PyObject *args arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_float,0))))) { - float val; + float val; int ecode = SWIG_AsVal_float(obj2, &val); if (!SWIG_IsOK(ecode)) { SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "FloatValue___setitem__" "', argument " "3"" of type '" "float""'"); @@ -24729,7 +24769,7 @@ SWIGINTERN int _wrap_new_DoubleValue__SWIG_3(PyObject *self, PyObject *args, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DoubleValue" "', argument " "1"" of type '" "Exiv2::ValueType< double > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DoubleValue" "', argument " "1"" of type '" "Exiv2::ValueType< double > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_DoubleValue" "', argument " "1"" of type '" "Exiv2::ValueType< double > const &""'"); } arg1 = reinterpret_cast< Exiv2::ValueType< double > * >(argp1); { @@ -24864,7 +24904,7 @@ SWIGINTERN PyObject *_wrap_DoubleValue_read__SWIG_1(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DoubleValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "DoubleValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -25406,7 +25446,7 @@ SWIGINTERN int _wrap_new_DoubleValue__SWIG_4(PyObject *self, PyObject *args, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DoubleValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DoubleValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_DoubleValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -25613,7 +25653,7 @@ SWIGINTERN PyObject *_wrap_DoubleValue___setitem__(PyObject *self, PyObject *arg arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_double,0))))) { - double val; + double val; int ecode = SWIG_AsVal_double(obj2, &val); if (!SWIG_IsOK(ecode)) { SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "DoubleValue___setitem__" "', argument " "3"" of type '" "double""'"); @@ -25695,16 +25735,16 @@ SwigPyBuiltin__Exiv2__Value_richcompare(PyObject *self, PyObject *other, int op) PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -25754,7 +25794,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Value_methods[] = { ":rtype: int\n" ":return: Return -1 if the value has no data area, else 0.\n" "" }, - { "typeId", _wrap_Value_typeId, METH_VARARGS, " Return the type identifier (Exif data format type)." }, + { "typeId", _wrap_Value_typeId, METH_VARARGS, "Return the type identifier (Exif data format type)." }, { "clone", _wrap_Value_clone, METH_VARARGS, "\n" "Return an auto-pointer to a copy of itself (deep copy).\n" " The caller owns this copy and the auto-pointer ensures that\n" @@ -25773,8 +25813,8 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Value_methods[] = { ":rtype: int\n" ":return: Number of bytes written.\n" "" }, - { "count", _wrap_Value_count, METH_VARARGS, " Return the number of components of the value" }, - { "size", _wrap_Value_size, METH_VARARGS, " Return the size of the value in bytes" }, + { "count", _wrap_Value_count, METH_VARARGS, "Return the number of components of the value" }, + { "size", _wrap_Value_size, METH_VARARGS, "Return the size of the value in bytes" }, { "write", _wrap_Value_write, METH_VARARGS, "\n" "Write the value to an output stream. You do not usually have\n" " to use this function; it is used for the implementation of\n" @@ -25820,7 +25860,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Value_methods[] = { ":rtype: (int, int) tuple\n" ":return: The converted value.\n" "" }, - { "sizeDataArea", _wrap_Value_sizeDataArea, METH_VARARGS, " Return the size of the data area, 0 if there is none." }, + { "sizeDataArea", _wrap_Value_sizeDataArea, METH_VARARGS, "Return the size of the data area, 0 if there is none." }, { "dataArea", _wrap_Value_dataArea, METH_VARARGS, "\n" "Return a copy of the data area if the value has one. The\n" " caller owns this copy and DataBuf ensures that it will be\n" @@ -25882,42 +25922,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Value_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__Value_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.Value", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.value.Value", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__Value_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__Value_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__Value_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - _wrap_Value___str___reprfunc_closure, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__Value_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__Value_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__Value_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__Value_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + _wrap_Value___str___reprfunc_closure, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__Value_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -25928,176 +25969,298 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__Value_type = { "their actual C++ type for simple tasks like reading the values from a\n" "string or data buffer. For other tasks, like modifying values you may\n" "need to downcast it to a specific subclass to access its interface.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__Value_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__Value_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__Value_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__Value_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__Value_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__Value_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_Value_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + _wrap_Value_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Value_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__Value_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__Value_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Value_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Value'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__Value_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Common interface for all types of values used with metadata.\n" + "\n" + "The interface provides a uniform way to access values independent of\n" + "their actual C++ type for simple tasks like reading the values from a\n" + "string or data buffer. For other tasks, like modifying values you may\n" + "need to downcast it to a specific subclass to access its interface.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)_wrap_Value___str___reprfunc_closure }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__Value_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__Value_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__Value_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_Value_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.Value", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Value_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet DataValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__DataValue_getset[] = { @@ -26111,16 +26274,16 @@ SwigPyBuiltin__Exiv2__DataValue_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -26179,215 +26342,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DataValue_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__DataValue_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.DataValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_DataValue_destructor_closure,/* tp_dealloc */ + "exiv2.value.DataValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_DataValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__DataValue_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__DataValue_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__DataValue_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__DataValue_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__DataValue_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__DataValue_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__DataValue_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__DataValue_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " %Value for an undefined data type.", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__DataValue_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__DataValue_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__DataValue_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_DataValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "%Value for an undefined data type.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__DataValue_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__DataValue_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__DataValue_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_DataValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_DataValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + _wrap_DataValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__DataValue_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__DataValue_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__DataValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__DataValue_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'DataValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__DataValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_DataValue }, + { Py_tp_dealloc, (void *)_wrap_delete_DataValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"%Value for an undefined data type." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__DataValue_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__DataValue_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__DataValue_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_DataValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.DataValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__DataValue_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet StringValueBase___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__StringValueBase_getset[] = { @@ -26423,16 +26702,16 @@ SwigPyBuiltin__Exiv2__StringValueBase_richcompare(PyObject *self, PyObject *othe PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -26494,42 +26773,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__StringValueBase_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__StringValueBase_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.StringValueBase", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.value.StringValueBase", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__StringValueBase_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__StringValueBase_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__StringValueBase_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__StringValueBase_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__StringValueBase_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__StringValueBase_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__StringValueBase_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__StringValueBase_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -26538,176 +26818,296 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__StringValueBase_type = { "\n" "Uses a std::string to store the value and implements defaults for\n" "most operations.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__StringValueBase_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__StringValueBase_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__StringValueBase_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__StringValueBase_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__StringValueBase_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__StringValueBase_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_StringValueBase_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_StringValueBase___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_StringValueBase_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_StringValueBase___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__StringValueBase_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__StringValueBase_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__StringValueBase_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__StringValueBase_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'StringValueBase'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__StringValueBase_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Abstract base class for a string based %Value type.\n" + "\n" + "Uses a std::string to store the value and implements defaults for\n" + "most operations.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__StringValueBase_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__StringValueBase_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__StringValueBase_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_StringValueBase_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_StringValueBase___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.StringValueBase", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__StringValueBase_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet StringValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__StringValue_getset[] = { @@ -26729,16 +27129,16 @@ SwigPyBuiltin__Exiv2__StringValue_richcompare(PyObject *self, PyObject *other, i PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -26747,42 +27147,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__StringValue_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__StringValue_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.StringValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_StringValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.StringValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_StringValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__StringValue_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__StringValue_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__StringValue_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__StringValue_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__StringValue_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__StringValue_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__StringValue_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__StringValue_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -26792,180 +27193,301 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__StringValue_type = { "This can be a plain Ascii string or a multipe byte encoded string. It is\n" "left to caller to decode and encode the string to and from readable\n" "text if that is required.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__StringValue_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__StringValue_methods,/* tp_methods */ - 0, /* tp_members */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__StringValue_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__StringValue_methods, /* tp_methods */ + 0, /* tp_members */ SwigPyBuiltin__Exiv2__StringValue_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_StringValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_StringValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__StringValue_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__StringValue_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__StringValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__StringValue_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'StringValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__StringValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_StringValue }, + { Py_tp_dealloc, (void *)_wrap_delete_StringValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "%Value for string type.\n" + "\n" + "This can be a plain Ascii string or a multipe byte encoded string. It is\n" + "left to caller to decode and encode the string to and from readable\n" + "text if that is required.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__StringValue_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__StringValue_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__StringValue_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.StringValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__StringValue_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet AsciiValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__AsciiValue_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Default constructor.", &AsciiValue___dict___getset }, + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"Default constructor.", &AsciiValue___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -26975,16 +27497,16 @@ SwigPyBuiltin__Exiv2__AsciiValue_richcompare(PyObject *self, PyObject *other, in PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -27024,42 +27546,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__AsciiValue_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__AsciiValue_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.AsciiValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_AsciiValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.AsciiValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_AsciiValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__AsciiValue_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__AsciiValue_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__AsciiValue_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__AsciiValue_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__AsciiValue_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__AsciiValue_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__AsciiValue_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__AsciiValue_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -27068,176 +27591,296 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__AsciiValue_type = { "\n" "This class is for null terminated single byte Ascii strings.\n" "This class also ensures that the string is null terminated.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__AsciiValue_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__AsciiValue_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ SwigPyBuiltin__Exiv2__AsciiValue_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__AsciiValue_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_AsciiValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__AsciiValue_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_AsciiValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__AsciiValue_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__AsciiValue_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__AsciiValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__AsciiValue_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'AsciiValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__AsciiValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_AsciiValue }, + { Py_tp_dealloc, (void *)_wrap_delete_AsciiValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "%Value for an Ascii string type.\n" + "\n" + "This class is for null terminated single byte Ascii strings.\n" + "This class also ensures that the string is null terminated.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__AsciiValue_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__AsciiValue_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__AsciiValue_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.AsciiValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__AsciiValue_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet CommentValue___dict___getset = { SwigPyObject_get___dict__, 0 }; static SwigPyGetSet CommentValue_byteOrder__getset = { _wrap_CommentValue_byteOrder__get, _wrap_CommentValue_byteOrder__set }; @@ -27251,7 +27894,7 @@ SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__CommentValue_getset[] = { "*Overload 2:*\n" "Constructor, uses read(const std::string& comment)\n" "", &CommentValue___dict___getset }, - { (char *)"byteOrder_", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)" Byte order of the comment string that was read", &CommentValue_byteOrder__getset }, + { (char *)"byteOrder_", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)"Byte order of the comment string that was read", &CommentValue_byteOrder__getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -27261,16 +27904,16 @@ SwigPyBuiltin__Exiv2__CommentValue_richcompare(PyObject *self, PyObject *other, PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -27330,46 +27973,47 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__CommentValue_methods[] = { "\n" "Todo: Implement rules to guess if the comment is UTF-8 encoded.\n" "" }, - { "charsetId", _wrap_CommentValue_charsetId, METH_VARARGS, " Return the Exif charset id of the comment" }, + { "charsetId", _wrap_CommentValue_charsetId, METH_VARARGS, "Return the Exif charset id of the comment" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__CommentValue_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.CommentValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_CommentValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.CommentValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_CommentValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__CommentValue_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__CommentValue_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__CommentValue_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__CommentValue_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__CommentValue_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__CommentValue_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__CommentValue_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__CommentValue_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -27380,180 +28024,302 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__CommentValue_type = { "comment is expected to be encoded in the character set indicated (default\n" "undefined), but this is not checked. It is left to caller to decode and\n" "encode the string to and from readable text if that is required.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__CommentValue_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__CommentValue_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__CommentValue_getset,/* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_CommentValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__CommentValue_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__CommentValue_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__CommentValue_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_CommentValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__CommentValue_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__CommentValue_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__CommentValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__CommentValue_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'CommentValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__CommentValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_CommentValue }, + { Py_tp_dealloc, (void *)_wrap_delete_CommentValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "%Value for an Exif comment.\n" + "\n" + "This can be a plain Ascii string or a multipe byte encoded string. The\n" + "comment is expected to be encoded in the character set indicated (default\n" + "undefined), but this is not checked. It is left to caller to decode and\n" + "encode the string to and from readable text if that is required.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__CommentValue_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__CommentValue_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__CommentValue_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.CommentValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__CommentValue_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet XmpValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XmpValue_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Return XMP array type, indicates if an XMP value is an array.", &XmpValue___dict___getset }, + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"Return XMP array type, indicates if an XMP value is an array.", &XmpValue___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -27563,22 +28329,22 @@ SwigPyBuiltin__Exiv2__XmpValue_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpValue_methods[] = { - { "xmpArrayType", _wrap_XmpValue_xmpArrayType, METH_VARARGS, " Return XMP array type, indicates if an XMP value is an array." }, - { "xmpStruct", _wrap_XmpValue_xmpStruct, METH_VARARGS, " Return XMP struct, indicates if an XMP value is a structure." }, + { "xmpArrayType", _wrap_XmpValue_xmpArrayType, METH_VARARGS, "Return XMP array type, indicates if an XMP value is an array." }, + { "xmpStruct", _wrap_XmpValue_xmpStruct, METH_VARARGS, "Return XMP struct, indicates if an XMP value is a structure." }, { "size", _wrap_XmpValue_size, METH_VARARGS, "" }, { "copy", _wrap_XmpValue_copy, METH_VARARGS, "\n" "Write value to a character data buffer.\n" @@ -27596,8 +28362,8 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpValue_methods[] = { ":rtype: int\n" ":return: Number of characters written.\n" "" }, - { "setXmpArrayType", _wrap_XmpValue_setXmpArrayType, METH_VARARGS, " Set the XMP array type to indicate that an XMP value is an array." }, - { "setXmpStruct", _wrap_XmpValue_setXmpStruct, METH_VARARGS, " Set the XMP struct type to indicate that an XMP value is a structure." }, + { "setXmpArrayType", _wrap_XmpValue_setXmpArrayType, METH_VARARGS, "Set the XMP array type to indicate that an XMP value is an array." }, + { "setXmpStruct", _wrap_XmpValue_setXmpStruct, METH_VARARGS, "Set the XMP struct type to indicate that an XMP value is a structure." }, { "read", _wrap_XmpValue_read, METH_VARARGS, "\n" "Read the value from a character buffer.\n" "\n" @@ -27619,215 +28385,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpValue_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpValue_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.XmpValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.value.XmpValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XmpValue_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XmpValue_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XmpValue_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XmpValue_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__XmpValue_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__XmpValue_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__XmpValue_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__XmpValue_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Base class for all Exiv2 values used to store XMP property values.",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__XmpValue_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XmpValue_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XmpValue_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Base class for all Exiv2 values used to store XMP property values.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__XmpValue_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__XmpValue_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__XmpValue_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpValue_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpValue_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpValue_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Base class for all Exiv2 values used to store XMP property values." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__XmpValue_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__XmpValue_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__XmpValue_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.XmpValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpValue_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet XmpTextValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XmpTextValue_getset[] = { @@ -27849,16 +28731,16 @@ SwigPyBuiltin__Exiv2__XmpTextValue_richcompare(PyObject *self, PyObject *other, PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -27939,42 +28821,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpTextValue_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpTextValue_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.XmpTextValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_XmpTextValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.XmpTextValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_XmpTextValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XmpTextValue_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XmpTextValue_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XmpTextValue_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XmpTextValue_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__XmpTextValue_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__XmpTextValue_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__XmpTextValue_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__XmpTextValue_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -27984,176 +28867,297 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpTextValue_type = { " specific values.\n" "\n" "Uses a std::string to store the value.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__XmpTextValue_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XmpTextValue_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XmpTextValue_getset,/* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_XmpTextValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__XmpTextValue_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__XmpTextValue_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__XmpTextValue_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_XmpTextValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { _wrap_XmpTextValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_XmpTextValue___getitem___ssizeargfunc_closure, /* sq_item */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_XmpTextValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpTextValue_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpTextValue_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpTextValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpTextValue_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpTextValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpTextValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_XmpTextValue }, + { Py_tp_dealloc, (void *)_wrap_delete_XmpTextValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "%Value type suitable for simple XMP properties and\n" + " XMP nodes of complex types which are not parsed into\n" + " specific values.\n" + "\n" + "Uses a std::string to store the value.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__XmpTextValue_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__XmpTextValue_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__XmpTextValue_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_XmpTextValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_XmpTextValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.XmpTextValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpTextValue_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet XmpArrayValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XmpArrayValue_getset[] = { @@ -28200,16 +29204,16 @@ SwigPyBuiltin__Exiv2__XmpArrayValue_richcompare(PyObject *self, PyObject *other, PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -28269,42 +29273,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpArrayValue_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpArrayValue_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.XmpArrayValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_XmpArrayValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.XmpArrayValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_XmpArrayValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XmpArrayValue_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XmpArrayValue_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XmpArrayValue_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XmpArrayValue_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__XmpArrayValue_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__XmpArrayValue_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__XmpArrayValue_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__XmpArrayValue_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -28316,188 +29321,311 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpArrayValue_type = { " LangAltValue.\n" "\n" "Uses a vector of std::string to store the value(s).\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__XmpArrayValue_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XmpArrayValue_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XmpArrayValue_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_XmpArrayValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__XmpArrayValue_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__XmpArrayValue_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__XmpArrayValue_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_XmpArrayValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_XmpArrayValue_count_lenfunc_closure,/* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_XmpArrayValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_XmpArrayValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_XmpArrayValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpArrayValue_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpArrayValue_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpArrayValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpArrayValue_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpArrayValue'."); + return NULL; + } + return pytype; +} -static SwigPyGetSet LangAltValue___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__LangAltValue_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" - "*Overload 1:*\n" - "Constructor.\n" - "\n" - "|\n" +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpArrayValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_XmpArrayValue }, + { Py_tp_dealloc, (void *)_wrap_delete_XmpArrayValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "%Value type for simple arrays. Each item in the array is a simple\n" + " value, without qualifiers. The array may be an ordered (*seq)*,\n" + " unordered (*bag)* or alternative array (*alt)*. The array\n" + " items must not contain qualifiers. For language alternatives use\n" + " LangAltValue.\n" "\n" - "*Overload 2:*\n" - "Constructor, reads the value from a string.\n" - "", &LangAltValue___dict___getset }, + "Uses a vector of std::string to store the value(s).\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__XmpArrayValue_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__XmpArrayValue_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__XmpArrayValue_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_XmpArrayValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_XmpArrayValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.XmpArrayValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpArrayValue_clientdata = {0, 0, 0, 0, 0, 0, 0}; + +static SwigPyGetSet LangAltValue___dict___getset = { SwigPyObject_get___dict__, 0 }; +SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__LangAltValue_getset[] = { + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" + "*Overload 1:*\n" + "Constructor.\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "Constructor, reads the value from a string.\n" + "", &LangAltValue___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -28507,16 +29635,16 @@ SwigPyBuiltin__Exiv2__LangAltValue_richcompare(PyObject *self, PyObject *other, PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -28605,42 +29733,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__LangAltValue_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__LangAltValue_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.LangAltValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_LangAltValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.LangAltValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_LangAltValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__LangAltValue_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__LangAltValue_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__LangAltValue_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__LangAltValue_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__LangAltValue_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__LangAltValue_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__LangAltValue_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__LangAltValue_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -28649,176 +29778,296 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__LangAltValue_type = { "\n" "A language alternative is an array consisting of simple text values,\n" "each of which has a language qualifier.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__LangAltValue_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_LangAltValue___iter___getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__LangAltValue_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__LangAltValue_getset,/* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_LangAltValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__LangAltValue_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_LangAltValue___iter___getiterfunc_closure, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__LangAltValue_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__LangAltValue_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_LangAltValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - _wrap_LangAltValue___getitem___binaryfunc_closure, /* mp_subscript */ - _wrap_LangAltValue___setitem___objobjargproc_closure, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + _wrap_LangAltValue___getitem___binaryfunc_closure, /* mp_subscript */ + _wrap_LangAltValue___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { _wrap_LangAltValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - _wrap_LangAltValue___contains___objobjproc_closure, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + _wrap_LangAltValue___contains___objobjproc_closure, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__LangAltValue_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__LangAltValue_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__LangAltValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__LangAltValue_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'LangAltValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__LangAltValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_LangAltValue }, + { Py_tp_dealloc, (void *)_wrap_delete_LangAltValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "%Value type for XMP language alternative properties.\n" + "\n" + "A language alternative is an array consisting of simple text values,\n" + "each of which has a language qualifier.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__LangAltValue_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__LangAltValue_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__LangAltValue_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)_wrap_LangAltValue___getitem___binaryfunc_closure }, + { Py_mp_ass_subscript, (void *)_wrap_LangAltValue___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_LangAltValue___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_LangAltValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)_wrap_LangAltValue___contains___objobjproc_closure }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.LangAltValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__LangAltValue_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet DateValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__DateValue_getset[] = { @@ -28840,16 +30089,16 @@ SwigPyBuiltin__Exiv2__DateValue_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -28888,7 +30137,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DateValue_methods[] = { "\n" " 1 in case of an unsupported date format\n" "" }, - { "setDate", _wrap_DateValue_setDate, METH_VARARGS, " Set the date" }, + { "setDate", _wrap_DateValue_setDate, METH_VARARGS, "Set the date" }, { "clone", _wrap_DateValue_clone, METH_VARARGS, "" }, { "copy", _wrap_DateValue_copy, METH_VARARGS, "\n" "Write value to a character data buffer.\n" @@ -28906,53 +30155,54 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DateValue_methods[] = { ":rtype: int\n" ":return: Number of characters written.\n" "" }, - { "getDate", _wrap_DateValue_getDate, METH_VARARGS, " Return date struct containing date information" }, + { "getDate", _wrap_DateValue_getDate, METH_VARARGS, "Return date struct containing date information" }, { "count", _wrap_DateValue_count, METH_VARARGS, "" }, { "size", _wrap_DateValue_size, METH_VARARGS, "" }, { "write", _wrap_DateValue_write, METH_VARARGS, "" }, - { "toLong", _wrap_DateValue_toLong, METH_VARARGS, " Return the value as a UNIX calender time converted to long." }, - { "toFloat", _wrap_DateValue_toFloat, METH_VARARGS, " Return the value as a UNIX calender time converted to float." }, - { "toRational", _wrap_DateValue_toRational, METH_VARARGS, " Return the value as a UNIX calender time converted to Rational." }, + { "toLong", _wrap_DateValue_toLong, METH_VARARGS, "Return the value as a UNIX calender time converted to long." }, + { "toFloat", _wrap_DateValue_toFloat, METH_VARARGS, "Return the value as a UNIX calender time converted to float." }, + { "toRational", _wrap_DateValue_toRational, METH_VARARGS, "Return the value as a UNIX calender time converted to Rational." }, { "__getitem__", _wrap_DateValue___getitem__, METH_VARARGS, "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__DateValue_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.DateValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_DateValue_destructor_closure,/* tp_dealloc */ + "exiv2.value.DateValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_DateValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__DateValue_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__DateValue_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__DateValue_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__DateValue_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__DateValue_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__DateValue_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__DateValue_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__DateValue_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -28961,186 +30211,306 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__DateValue_type = { "\n" "This class is limited to parsing simple date strings in the ISO 8601\n" "format CCYYMMDD (century, year, month, day).\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__DateValue_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__DateValue_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__DateValue_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_DateValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__DateValue_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__DateValue_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__DateValue_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_DateValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_DateValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_DateValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_DateValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_DateValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__DateValue_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__DateValue_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__DateValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__DateValue_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'DateValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__DateValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_DateValue }, + { Py_tp_dealloc, (void *)_wrap_delete_DateValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "%Value for simple ISO 8601 dates\n" + "\n" + "This class is limited to parsing simple date strings in the ISO 8601\n" + "format CCYYMMDD (century, year, month, day).\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__DateValue_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__DateValue_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__DateValue_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_DateValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_DateValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.DateValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__DateValue_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet Date_year_getset = { _wrap_Date_year_get, _wrap_Date_year_set }; static SwigPyGetSet Date___dict___getset = { SwigPyObject_get___dict__, 0 }; static SwigPyGetSet Date_day_getset = { _wrap_Date_day_get, _wrap_Date_day_set }; static SwigPyGetSet Date_month_getset = { _wrap_Date_month_get, _wrap_Date_month_set }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__DateValue__Date_getset[] = { - { (char *)"year", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)" Year", &Date_year_getset }, + { (char *)"year", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)"Year", &Date_year_getset }, { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"", &Date___dict___getset }, - { (char *)"day", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)" Day", &Date_day_getset }, - { (char *)"month", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)" Month", &Date_month_getset }, + { (char *)"day", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)"Day", &Date_day_getset }, + { (char *)"month", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)"Month", &Date_month_getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -29150,16 +30520,16 @@ SwigPyBuiltin__Exiv2__DateValue__Date_richcompare(PyObject *self, PyObject *othe PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -29187,215 +30557,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DateValue__Date_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__DateValue__Date_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.Date", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_Date_destructor_closure, /* tp_dealloc */ + "exiv2.value.Date", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_Date_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__DateValue__Date_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__DateValue__Date_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__DateValue__Date_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__DateValue__Date_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__DateValue__Date_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__DateValue__Date_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__DateValue__Date_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__DateValue__Date_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Simple Date helper structure", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__DateValue__Date_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_Date___iter___getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__DateValue__Date_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__DateValue__Date_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_Date, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Simple Date helper structure", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__DateValue__Date_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_Date___iter___getiterfunc_closure, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__DateValue__Date_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__DateValue__Date_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_Date, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - _wrap_Date___getitem___binaryfunc_closure,/* mp_subscript */ - _wrap_Date___setitem___objobjargproc_closure, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + _wrap_Date___getitem___binaryfunc_closure, /* mp_subscript */ + _wrap_Date___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__DateValue__Date_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__DateValue__Date_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__DateValue__Date_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__DateValue__Date_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Date'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__DateValue__Date_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_Date }, + { Py_tp_dealloc, (void *)_wrap_delete_Date_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Simple Date helper structure" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__DateValue__Date_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__DateValue__Date_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__DateValue__Date_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)_wrap_Date___getitem___binaryfunc_closure }, + { Py_mp_ass_subscript, (void *)_wrap_Date___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_Date___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.Date", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__DateValue__Date_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet TimeValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__TimeValue_getset[] = { @@ -29417,16 +30903,16 @@ SwigPyBuiltin__Exiv2__TimeValue_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -29465,7 +30951,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__TimeValue_methods[] = { "\n" " 1 in case of an unsupported time format\n" "" }, - { "setTime", _wrap_TimeValue_setTime, METH_VARARGS, " Set the time" }, + { "setTime", _wrap_TimeValue_setTime, METH_VARARGS, "Set the time" }, { "clone", _wrap_TimeValue_clone, METH_VARARGS, "" }, { "copy", _wrap_TimeValue_copy, METH_VARARGS, "\n" "Write value to a character data buffer.\n" @@ -29483,53 +30969,54 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__TimeValue_methods[] = { ":rtype: int\n" ":return: Number of characters written.\n" "" }, - { "getTime", _wrap_TimeValue_getTime, METH_VARARGS, " Return time struct containing time information" }, + { "getTime", _wrap_TimeValue_getTime, METH_VARARGS, "Return time struct containing time information" }, { "count", _wrap_TimeValue_count, METH_VARARGS, "" }, { "size", _wrap_TimeValue_size, METH_VARARGS, "" }, { "write", _wrap_TimeValue_write, METH_VARARGS, "" }, - { "toLong", _wrap_TimeValue_toLong, METH_VARARGS, " Returns number of seconds in the day in UTC." }, - { "toFloat", _wrap_TimeValue_toFloat, METH_VARARGS, " Returns number of seconds in the day in UTC converted to float." }, - { "toRational", _wrap_TimeValue_toRational, METH_VARARGS, " Returns number of seconds in the day in UTC converted to Rational." }, + { "toLong", _wrap_TimeValue_toLong, METH_VARARGS, "Returns number of seconds in the day in UTC." }, + { "toFloat", _wrap_TimeValue_toFloat, METH_VARARGS, "Returns number of seconds in the day in UTC converted to float." }, + { "toRational", _wrap_TimeValue_toRational, METH_VARARGS, "Returns number of seconds in the day in UTC converted to Rational." }, { "__getitem__", _wrap_TimeValue___getitem__, METH_VARARGS, "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__TimeValue_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.TimeValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_TimeValue_destructor_closure,/* tp_dealloc */ + "exiv2.value.TimeValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_TimeValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__TimeValue_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__TimeValue_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__TimeValue_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__TimeValue_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__TimeValue_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__TimeValue_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__TimeValue_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__TimeValue_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -29540,176 +31027,298 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__TimeValue_type = { "format HHMMSS±HHMM where HHMMSS refers to local hour, minute and\n" "seconds and ±HHMM refers to hours and minutes ahead or behind\n" "Universal Coordinated Time.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__TimeValue_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__TimeValue_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__TimeValue_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_TimeValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__TimeValue_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__TimeValue_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__TimeValue_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_TimeValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_TimeValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_TimeValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_TimeValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_TimeValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__TimeValue_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__TimeValue_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__TimeValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__TimeValue_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'TimeValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__TimeValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_TimeValue }, + { Py_tp_dealloc, (void *)_wrap_delete_TimeValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "%Value for simple ISO 8601 times.\n" + "\n" + "This class is limited to handling simple time strings in the ISO 8601\n" + "format HHMMSS±HHMM where HHMMSS refers to local hour, minute and\n" + "seconds and ±HHMM refers to hours and minutes ahead or behind\n" + "Universal Coordinated Time.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__TimeValue_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__TimeValue_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__TimeValue_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_TimeValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_TimeValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.TimeValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__TimeValue_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet Time_tzHour_getset = { _wrap_Time_tzHour_get, _wrap_Time_tzHour_set }; static SwigPyGetSet Time___dict___getset = { SwigPyObject_get___dict__, 0 }; @@ -29718,12 +31327,12 @@ static SwigPyGetSet Time_minute_getset = { _wrap_Time_minute_get, _wrap_Time_min static SwigPyGetSet Time_second_getset = { _wrap_Time_second_get, _wrap_Time_second_set }; static SwigPyGetSet Time_tzMinute_getset = { _wrap_Time_tzMinute_get, _wrap_Time_tzMinute_set }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__TimeValue__Time_getset[] = { - { (char *)"tzHour", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)" Hours ahead or behind UTC", &Time_tzHour_getset }, + { (char *)"tzHour", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)"Hours ahead or behind UTC", &Time_tzHour_getset }, { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"", &Time___dict___getset }, - { (char *)"hour", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)" Hour", &Time_hour_getset }, - { (char *)"minute", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)" Minute", &Time_minute_getset }, - { (char *)"second", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)" Second", &Time_second_getset }, - { (char *)"tzMinute", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)" Minutes ahead or behind UTC", &Time_tzMinute_getset }, + { (char *)"hour", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)"Hour", &Time_hour_getset }, + { (char *)"minute", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)"Minute", &Time_minute_getset }, + { (char *)"second", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)"Second", &Time_second_getset }, + { (char *)"tzMinute", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)"Minutes ahead or behind UTC", &Time_tzMinute_getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -29733,16 +31342,16 @@ SwigPyBuiltin__Exiv2__TimeValue__Time_richcompare(PyObject *self, PyObject *othe PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -29770,215 +31379,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__TimeValue__Time_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__TimeValue__Time_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.Time", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_Time_destructor_closure, /* tp_dealloc */ + "exiv2.value.Time", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_Time_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__TimeValue__Time_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__TimeValue__Time_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__TimeValue__Time_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__TimeValue__Time_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__TimeValue__Time_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__TimeValue__Time_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__TimeValue__Time_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__TimeValue__Time_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Simple Time helper structure", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__TimeValue__Time_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_Time___iter___getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__TimeValue__Time_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__TimeValue__Time_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_Time, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Simple Time helper structure", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__TimeValue__Time_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_Time___iter___getiterfunc_closure, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__TimeValue__Time_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__TimeValue__Time_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_Time, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - _wrap_Time___getitem___binaryfunc_closure,/* mp_subscript */ - _wrap_Time___setitem___objobjargproc_closure, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + _wrap_Time___getitem___binaryfunc_closure, /* mp_subscript */ + _wrap_Time___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__TimeValue__Time_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__TimeValue__Time_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__TimeValue__Time_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__TimeValue__Time_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Time'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__TimeValue__Time_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_Time }, + { Py_tp_dealloc, (void *)_wrap_delete_Time_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Simple Time helper structure" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__TimeValue__Time_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__TimeValue__Time_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__TimeValue__Time_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)_wrap_Time___getitem___binaryfunc_closure }, + { Py_mp_ass_subscript, (void *)_wrap_Time___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_Time___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.Time", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__TimeValue__Time_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet UShortValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_getset[] = { @@ -30010,16 +31735,16 @@ SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_richcompare(PyObject *self, PyObject PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -30043,7 +31768,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_methods[] = { { "toLong", _wrap_UShortValue_toLong, METH_VARARGS, "" }, { "toFloat", _wrap_UShortValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_UShortValue_toRational, METH_VARARGS, "" }, - { "sizeDataArea", _wrap_UShortValue_sizeDataArea, METH_VARARGS, " Return the size of the data area." }, + { "sizeDataArea", _wrap_UShortValue_sizeDataArea, METH_VARARGS, "Return the size of the data area." }, { "dataArea", _wrap_UShortValue_dataArea, METH_VARARGS, "\n" "Return a copy of the data area in a DataBuf. The caller owns\n" " this copy and DataBuf ensures that it will be deleted.\n" @@ -30054,218 +31779,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.UShortValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_UShortValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.UShortValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_UShortValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ + (cmpfunc) 0, /* tp_compare */ #endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type.as_sequence,/* tp_as_sequence */ + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type.as_sequence, /* tp_as_sequence */ &SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type.as_buffer, /* tp_as_buffer */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Sequence of uint16_t values.\n" "The data components can be accessed like a Python list.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_UShortValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_UShortValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_UShortValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_UShortValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_UShortValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_UShortValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - _wrap_UShortValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ + _wrap_UShortValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'UShortValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_UShortValue }, + { Py_tp_dealloc, (void *)_wrap_delete_UShortValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Sequence of uint16_t values.\n" + "The data components can be accessed like a Python list.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_UShortValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_UShortValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)_wrap_UShortValue___setitem___ssizeobjargproc_closure }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.UShortValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet ULongValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_getset[] = { @@ -30297,16 +32141,16 @@ SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_richcompare(PyObject *self, PyObject PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -30330,7 +32174,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_methods[] = { { "toLong", _wrap_ULongValue_toLong, METH_VARARGS, "" }, { "toFloat", _wrap_ULongValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_ULongValue_toRational, METH_VARARGS, "" }, - { "sizeDataArea", _wrap_ULongValue_sizeDataArea, METH_VARARGS, " Return the size of the data area." }, + { "sizeDataArea", _wrap_ULongValue_sizeDataArea, METH_VARARGS, "Return the size of the data area." }, { "dataArea", _wrap_ULongValue_dataArea, METH_VARARGS, "\n" "Return a copy of the data area in a DataBuf. The caller owns\n" " this copy and DataBuf ensures that it will be deleted.\n" @@ -30341,218 +32185,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.ULongValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_ULongValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.ULongValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_ULongValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ + (cmpfunc) 0, /* tp_compare */ #endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type.as_sequence,/* tp_as_sequence */ + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type.as_sequence, /* tp_as_sequence */ &SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type.as_buffer, /* tp_as_buffer */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Sequence of uint32_t values.\n" "The data components can be accessed like a Python list.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_ULongValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_ULongValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_ULongValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_ULongValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_ULongValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_ULongValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - _wrap_ULongValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ + _wrap_ULongValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ULongValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_ULongValue }, + { Py_tp_dealloc, (void *)_wrap_delete_ULongValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Sequence of uint32_t values.\n" + "The data components can be accessed like a Python list.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_ULongValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_ULongValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)_wrap_ULongValue___setitem___ssizeobjargproc_closure }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.ULongValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet URationalValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_getset[] = { @@ -30584,16 +32547,16 @@ SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_richcompare(PyObject *self, PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -30617,7 +32580,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_metho { "toLong", _wrap_URationalValue_toLong, METH_VARARGS, "" }, { "toFloat", _wrap_URationalValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_URationalValue_toRational, METH_VARARGS, "" }, - { "sizeDataArea", _wrap_URationalValue_sizeDataArea, METH_VARARGS, " Return the size of the data area." }, + { "sizeDataArea", _wrap_URationalValue_sizeDataArea, METH_VARARGS, "Return the size of the data area." }, { "dataArea", _wrap_URationalValue_dataArea, METH_VARARGS, "\n" "Return a copy of the data area in a DataBuf. The caller owns\n" " this copy and DataBuf ensures that it will be deleted.\n" @@ -30628,218 +32591,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_metho { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.URationalValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_URationalValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.URationalValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_URationalValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type.as_number,/* tp_as_number */ - &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type.as_sequence,/* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type.as_mapping,/* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type.as_buffer,/* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Sequence of Exiv2::URational values.\n" "The data components can be accessed like a Python list.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_URationalValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_URationalValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_URationalValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_URationalValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_URationalValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_URationalValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - _wrap_URationalValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ + _wrap_URationalValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'URationalValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_URationalValue }, + { Py_tp_dealloc, (void *)_wrap_delete_URationalValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Sequence of Exiv2::URational values.\n" + "The data components can be accessed like a Python list.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_URationalValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_URationalValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)_wrap_URationalValue___setitem___ssizeobjargproc_closure }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.URationalValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet ShortValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_getset[] = { @@ -30871,16 +32953,16 @@ SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_richcompare(PyObject *self, PyObject PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -30904,7 +32986,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_methods[] = { { "toLong", _wrap_ShortValue_toLong, METH_VARARGS, "" }, { "toFloat", _wrap_ShortValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_ShortValue_toRational, METH_VARARGS, "" }, - { "sizeDataArea", _wrap_ShortValue_sizeDataArea, METH_VARARGS, " Return the size of the data area." }, + { "sizeDataArea", _wrap_ShortValue_sizeDataArea, METH_VARARGS, "Return the size of the data area." }, { "dataArea", _wrap_ShortValue_dataArea, METH_VARARGS, "\n" "Return a copy of the data area in a DataBuf. The caller owns\n" " this copy and DataBuf ensures that it will be deleted.\n" @@ -30915,218 +32997,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.ShortValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_ShortValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.ShortValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_ShortValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ + (cmpfunc) 0, /* tp_compare */ #endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type.as_number, /* tp_as_number */ + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type.as_number, /* tp_as_number */ &SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type.as_buffer, /* tp_as_buffer */ + &SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Sequence of int16_t values.\n" "The data components can be accessed like a Python list.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_ShortValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_ShortValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_ShortValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_ShortValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_ShortValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_ShortValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - _wrap_ShortValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ + _wrap_ShortValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ShortValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_ShortValue }, + { Py_tp_dealloc, (void *)_wrap_delete_ShortValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Sequence of int16_t values.\n" + "The data components can be accessed like a Python list.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_ShortValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_ShortValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)_wrap_ShortValue___setitem___ssizeobjargproc_closure }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.ShortValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet LongValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_getset[] = { @@ -31158,16 +33359,16 @@ SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_richcompare(PyObject *self, PyObject PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -31191,7 +33392,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_methods[] = { { "toLong", _wrap_LongValue_toLong, METH_VARARGS, "" }, { "toFloat", _wrap_LongValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_LongValue_toRational, METH_VARARGS, "" }, - { "sizeDataArea", _wrap_LongValue_sizeDataArea, METH_VARARGS, " Return the size of the data area." }, + { "sizeDataArea", _wrap_LongValue_sizeDataArea, METH_VARARGS, "Return the size of the data area." }, { "dataArea", _wrap_LongValue_dataArea, METH_VARARGS, "\n" "Return a copy of the data area in a DataBuf. The caller owns\n" " this copy and DataBuf ensures that it will be deleted.\n" @@ -31202,218 +33403,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.LongValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_LongValue_destructor_closure,/* tp_dealloc */ + "exiv2.value.LongValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_LongValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ + (cmpfunc) 0, /* tp_compare */ #endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type.as_number, /* tp_as_number */ + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type.as_number, /* tp_as_number */ &SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type.as_buffer, /* tp_as_buffer */ + &SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Sequence of int32_t values.\n" "The data components can be accessed like a Python list.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_LongValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_LongValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_LongValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_LongValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_LongValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_LongValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - _wrap_LongValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ + _wrap_LongValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'LongValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_LongValue }, + { Py_tp_dealloc, (void *)_wrap_delete_LongValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Sequence of int32_t values.\n" + "The data components can be accessed like a Python list.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_LongValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_LongValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)_wrap_LongValue___setitem___ssizeobjargproc_closure }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.LongValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet RationalValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_getset[] = { @@ -31445,16 +33765,16 @@ SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_richcompare(PyObject *self, P PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -31478,7 +33798,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_method { "toLong", _wrap_RationalValue_toLong, METH_VARARGS, "" }, { "toFloat", _wrap_RationalValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_RationalValue_toRational, METH_VARARGS, "" }, - { "sizeDataArea", _wrap_RationalValue_sizeDataArea, METH_VARARGS, " Return the size of the data area." }, + { "sizeDataArea", _wrap_RationalValue_sizeDataArea, METH_VARARGS, "Return the size of the data area." }, { "dataArea", _wrap_RationalValue_dataArea, METH_VARARGS, "\n" "Return a copy of the data area in a DataBuf. The caller owns\n" " this copy and DataBuf ensures that it will be deleted.\n" @@ -31489,218 +33809,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_method { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.RationalValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_RationalValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.RationalValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_RationalValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type.as_number,/* tp_as_number */ - &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type.as_sequence,/* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type.as_mapping,/* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type.as_buffer,/* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Sequence of Exiv2::Rational values.\n" "The data components can be accessed like a Python list.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_RationalValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_RationalValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_RationalValue_count_lenfunc_closure,/* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_RationalValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_RationalValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_RationalValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - _wrap_RationalValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ + _wrap_RationalValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'RationalValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_RationalValue }, + { Py_tp_dealloc, (void *)_wrap_delete_RationalValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Sequence of Exiv2::Rational values.\n" + "The data components can be accessed like a Python list.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_RationalValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_RationalValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)_wrap_RationalValue___setitem___ssizeobjargproc_closure }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.RationalValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet FloatValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ValueTypeT_float_t_getset[] = { @@ -31732,16 +34171,16 @@ SwigPyBuiltin__Exiv2__ValueTypeT_float_t_richcompare(PyObject *self, PyObject *o PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -31765,7 +34204,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_float_t_methods[] = { { "toLong", _wrap_FloatValue_toLong, METH_VARARGS, "" }, { "toFloat", _wrap_FloatValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_FloatValue_toRational, METH_VARARGS, "" }, - { "sizeDataArea", _wrap_FloatValue_sizeDataArea, METH_VARARGS, " Return the size of the data area." }, + { "sizeDataArea", _wrap_FloatValue_sizeDataArea, METH_VARARGS, "Return the size of the data area." }, { "dataArea", _wrap_FloatValue_dataArea, METH_VARARGS, "\n" "Return a copy of the data area in a DataBuf. The caller owns\n" " this copy and DataBuf ensures that it will be deleted.\n" @@ -31776,218 +34215,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_float_t_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.FloatValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_FloatValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.FloatValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_FloatValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Sequence of float values.\n" "The data components can be accessed like a Python list.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ValueTypeT_float_t_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ValueTypeT_float_t_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ValueTypeT_float_t_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_FloatValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ValueTypeT_float_t_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ValueTypeT_float_t_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ValueTypeT_float_t_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_FloatValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_FloatValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_FloatValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_FloatValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_FloatValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - _wrap_FloatValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ + _wrap_FloatValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_float_t_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'FloatValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_FloatValue }, + { Py_tp_dealloc, (void *)_wrap_delete_FloatValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Sequence of float values.\n" + "The data components can be accessed like a Python list.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_float_t_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_float_t_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_float_t_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_FloatValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_FloatValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)_wrap_FloatValue___setitem___ssizeobjargproc_closure }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.FloatValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_float_t_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet DoubleValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ValueTypeT_double_t_getset[] = { @@ -32019,16 +34577,16 @@ SwigPyBuiltin__Exiv2__ValueTypeT_double_t_richcompare(PyObject *self, PyObject * PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -32052,7 +34610,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_double_t_methods[] = { { "toLong", _wrap_DoubleValue_toLong, METH_VARARGS, "" }, { "toFloat", _wrap_DoubleValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_DoubleValue_toRational, METH_VARARGS, "" }, - { "sizeDataArea", _wrap_DoubleValue_sizeDataArea, METH_VARARGS, " Return the size of the data area." }, + { "sizeDataArea", _wrap_DoubleValue_sizeDataArea, METH_VARARGS, "Return the size of the data area." }, { "dataArea", _wrap_DoubleValue_dataArea, METH_VARARGS, "\n" "Return a copy of the data area in a DataBuf. The caller owns\n" " this copy and DataBuf ensures that it will be deleted.\n" @@ -32063,218 +34621,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_double_t_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.DoubleValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_DoubleValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.DoubleValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_DoubleValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Sequence of double values.\n" "The data components can be accessed like a Python list.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ValueTypeT_double_t_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ValueTypeT_double_t_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ValueTypeT_double_t_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_DoubleValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ValueTypeT_double_t_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ValueTypeT_double_t_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ValueTypeT_double_t_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_DoubleValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_DoubleValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_DoubleValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_DoubleValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_DoubleValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - _wrap_DoubleValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ + _wrap_DoubleValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_double_t_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'DoubleValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_DoubleValue }, + { Py_tp_dealloc, (void *)_wrap_delete_DoubleValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Sequence of double values.\n" + "The data components can be accessed like a Python list.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_double_t_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_double_t_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_double_t_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_DoubleValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_DoubleValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)_wrap_DoubleValue___setitem___ssizeobjargproc_closure }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.DoubleValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_double_t_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -32832,7 +35509,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -33015,7 +35692,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -33041,8 +35718,7 @@ SWIG_init(void) { /* type 'Exiv2::Value' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Value_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); { PyObject* module = PyImport_ImportModule("enum"); @@ -33054,31 +35730,26 @@ SWIG_init(void) { return NULL; } - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'Value'."); + builtin_pytype = SwigPyBuiltin__Exiv2__Value_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__Value_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "Value", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "Value"); d = md; /* type 'Exiv2::DataValue' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__DataValue_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33092,27 +35763,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'DataValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__DataValue_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__DataValue_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "DataValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "DataValue"); d = md; /* type 'Exiv2::StringValueBase' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__StringValueBase_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33126,27 +35794,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'StringValueBase'."); + builtin_pytype = SwigPyBuiltin__Exiv2__StringValueBase_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__StringValueBase_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "StringValueBase", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "StringValueBase"); d = md; /* type 'Exiv2::StringValue' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__StringValue_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__StringValueBase"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33160,27 +35825,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'StringValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__StringValue_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__StringValue_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "StringValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "StringValue"); d = md; /* type 'Exiv2::AsciiValue' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__AsciiValue_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__StringValueBase"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33194,29 +35856,26 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'AsciiValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__AsciiValue_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__AsciiValue_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "AsciiValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "AsciiValue"); d = md; /* type 'Exiv2::CommentValue' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__CommentValue_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "CharsetId",_create_enum_Exiv2_CommentValue_CharsetId( "CharsetId", "Character set identifiers for the character sets defined by Exif.", _get_enum_list(0, "ascii",Exiv2::CommentValue::ascii,"jis",Exiv2::CommentValue::jis,"unicode",Exiv2::CommentValue::unicode,"undefined",Exiv2::CommentValue::undefined,"invalidCharsetId",Exiv2::CommentValue::invalidCharsetId,"lastCharsetId",Exiv2::CommentValue::lastCharsetId, NULL))); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__StringValueBase"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33230,31 +35889,28 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'CommentValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__CommentValue_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__CommentValue_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "CommentValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "CommentValue"); d = md; /* type 'Exiv2::XmpValue' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpValue_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "XmpArrayType",_create_enum_Exiv2_XmpValue_XmpArrayType( "XmpArrayType", "XMP array types.", _get_enum_list(0, "xaNone",Exiv2::XmpValue::xaNone,"xaAlt",Exiv2::XmpValue::xaAlt,"xaBag",Exiv2::XmpValue::xaBag,"xaSeq",Exiv2::XmpValue::xaSeq, NULL))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "XmpStruct",_create_enum_Exiv2_XmpValue_XmpStruct( "XmpStruct", "XMP structure indicator.", _get_enum_list(0, "xsNone",Exiv2::XmpValue::xsNone,"xsStruct",Exiv2::XmpValue::xsStruct, NULL))); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33268,27 +35924,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__XmpValue_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__XmpValue_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpValue"); d = md; /* type 'Exiv2::XmpTextValue' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpTextValue_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__XmpValue"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33302,27 +35955,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpTextValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__XmpTextValue_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__XmpTextValue_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpTextValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpTextValue"); d = md; /* type 'Exiv2::XmpArrayValue' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpArrayValue_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__XmpValue"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33336,27 +35986,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpArrayValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__XmpArrayValue_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__XmpArrayValue_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpArrayValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpArrayValue"); d = md; /* type 'Exiv2::LangAltValue' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__LangAltValue_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__XmpValue"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33370,27 +36017,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'LangAltValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__LangAltValue_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__LangAltValue_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "LangAltValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "LangAltValue"); d = md; /* type 'Exiv2::DateValue' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__DateValue_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33404,50 +36048,44 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'DateValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__DateValue_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__DateValue_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "DateValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "DateValue"); d = md; /* type 'Exiv2::DateValue::Date' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__DateValue__Date_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'Date'."); + builtin_pytype = SwigPyBuiltin__Exiv2__DateValue__Date_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__DateValue__Date_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "Date", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "Date"); d = md; /* type 'Exiv2::TimeValue' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__TimeValue_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33461,50 +36099,44 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'TimeValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__TimeValue_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__TimeValue_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "TimeValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "TimeValue"); d = md; /* type 'Exiv2::TimeValue::Time' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__TimeValue__Time_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'Time'."); + builtin_pytype = SwigPyBuiltin__Exiv2__TimeValue__Time_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__TimeValue__Time_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "Time", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "Time"); d = md; /* type 'Exiv2::ValueType< uint16_t >' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33518,27 +36150,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'UShortValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "UShortValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "UShortValue"); d = md; /* type 'Exiv2::ValueType< uint32_t >' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33552,27 +36181,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'ULongValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "ULongValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "ULongValue"); d = md; /* type 'Exiv2::ValueType< Exiv2::URational >' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33586,27 +36212,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'URationalValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "URationalValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "URationalValue"); d = md; /* type 'Exiv2::ValueType< int16_t >' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33620,27 +36243,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'ShortValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "ShortValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "ShortValue"); d = md; /* type 'Exiv2::ValueType< int32_t >' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33654,27 +36274,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'LongValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "LongValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "LongValue"); d = md; /* type 'Exiv2::ValueType< Exiv2::Rational >' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33688,27 +36305,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'RationalValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "RationalValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "RationalValue"); d = md; /* type 'Exiv2::ValueType< float >' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33722,27 +36336,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'FloatValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ValueTypeT_float_t_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "FloatValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "FloatValue"); d = md; /* type 'Exiv2::ValueType< double >' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33756,18 +36367,18 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'DoubleValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ValueTypeT_double_t_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "DoubleValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "DoubleValue"); d = md; diff --git a/src/swig-0_27_7/version.py b/src/swig-0_27_7/version.py index 81340a2e..ede4f15e 100644 --- a/src/swig-0_27_7/version.py +++ b/src/swig-0_27_7/version.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_27_7/version_wrap.cxx b/src/swig-0_27_7/version_wrap.cxx index 07a0a57a..38ec620f 100644 --- a/src/swig-0_27_7/version_wrap.cxx +++ b/src/swig-0_27_7/version_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_version" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -3964,7 +4016,6 @@ static swig_module_info swig_module = {swig_types, 10, 0, 0, 0, 0}; # define SWIG_init init_version #endif -#define SWIG_name "_version" #ifdef __cplusplus #include @@ -4034,7 +4085,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4042,7 +4093,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4050,8 +4101,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4060,7 +4111,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4083,7 +4134,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4097,11 +4148,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4258,7 +4307,7 @@ static void _set_python_exception() { - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4661,10 +4710,10 @@ SWIGINTERN PyObject *_wrap_testVersion(PyObject *self, PyObject *args) { static PyMethodDef SwigMethods[] = { { "versionInfo", _wrap_versionInfo, METH_NOARGS, "Return a dict of libexiv2 build options."}, - { "versionNumber", _wrap_versionNumber, METH_NOARGS, " Return the version of %Exiv2 available at runtime as an integer."}, - { "versionString", _wrap_versionString, METH_NOARGS, " Return the version string Example: \"0.25.0\" (major.minor.patch)"}, - { "versionNumberHexString", _wrap_versionNumberHexString, METH_NOARGS, " Return the version of %Exiv2 as hex string of fixed length 6."}, - { "version", _wrap_version, METH_NOARGS, " Return the version of %Exiv2 as \"C\" string eg \"0.27.0.2\"."}, + { "versionNumber", _wrap_versionNumber, METH_NOARGS, "Return the version of %Exiv2 available at runtime as an integer."}, + { "versionString", _wrap_versionString, METH_NOARGS, "Return the version string Example: \"0.25.0\" (major.minor.patch)"}, + { "versionNumberHexString", _wrap_versionNumberHexString, METH_NOARGS, "Return the version of %Exiv2 as hex string of fixed length 6."}, + { "version", _wrap_version, METH_NOARGS, "Return the version of %Exiv2 as \"C\" string eg \"0.27.0.2\"."}, { "testVersion", _wrap_testVersion, METH_VARARGS, "\n" "Test the version of the available %Exiv2 library at runtime. Return\n" " true if it is the same as or newer than the passed-in version.\n" @@ -4998,7 +5047,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -5181,7 +5230,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) diff --git a/src/swig-0_27_7/xmp.py b/src/swig-0_27_7/xmp.py index fa7276a7..ec9c97fb 100644 --- a/src/swig-0_27_7/xmp.py +++ b/src/swig-0_27_7/xmp.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_27_7/xmp_wrap.cxx b/src/swig-0_27_7/xmp_wrap.cxx index 3714cdb7..68c52fcb 100644 --- a/src/swig-0_27_7/xmp_wrap.cxx +++ b/src/swig-0_27_7/xmp_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_xmp" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -4012,7 +4064,6 @@ static swig_module_info swig_module = {swig_types, 58, 0, 0, 0, 0}; # define SWIG_init init_xmp #endif -#define SWIG_name "_xmp" #ifdef __cplusplus #include @@ -4082,7 +4133,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4090,7 +4141,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4098,8 +4149,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4108,7 +4159,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4131,7 +4182,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4145,11 +4196,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4306,7 +4355,7 @@ static void _set_python_exception() { - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4433,7 +4482,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -4456,10 +4505,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -4494,12 +4543,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -5176,7 +5221,7 @@ SwigPython_std_pair_repr (PyObject *o) PyTuple_SET_ITEM(tuple, 0, PyObject_GetAttrString(o, (char*) "first")); PyTuple_SET_ITEM(tuple, 1, PyObject_GetAttrString(o, (char*) "second")); PyObject *result = PyObject_Repr(tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -5445,7 +5490,7 @@ SWIGINTERN PyObject *_wrap_XmpData_iterator_base___eq__(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData_iterator_base___eq__" "', argument " "2"" of type '" "XmpData_iterator_base const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData_iterator_base___eq__" "', argument " "2"" of type '" "XmpData_iterator_base const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData_iterator_base___eq__" "', argument " "2"" of type '" "XmpData_iterator_base const &""'"); } arg2 = reinterpret_cast< XmpData_iterator_base * >(argp2); result = (bool)((XmpData_iterator_base const *)arg1)->operator ==((XmpData_iterator_base const &)*arg2); @@ -5456,7 +5501,7 @@ SWIGINTERN PyObject *_wrap_XmpData_iterator_base___eq__(PyObject *self, PyObject return NULL; } PyErr_Clear(); - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } @@ -5483,7 +5528,7 @@ SWIGINTERN PyObject *_wrap_XmpData_iterator_base___ne__(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData_iterator_base___ne__" "', argument " "2"" of type '" "XmpData_iterator_base const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData_iterator_base___ne__" "', argument " "2"" of type '" "XmpData_iterator_base const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData_iterator_base___ne__" "', argument " "2"" of type '" "XmpData_iterator_base const &""'"); } arg2 = reinterpret_cast< XmpData_iterator_base * >(argp2); result = (bool)((XmpData_iterator_base const *)arg1)->operator !=((XmpData_iterator_base const &)*arg2); @@ -5494,7 +5539,7 @@ SWIGINTERN PyObject *_wrap_XmpData_iterator_base___ne__(PyObject *self, PyObject return NULL; } PyErr_Clear(); - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } @@ -5681,7 +5726,7 @@ SWIGINTERN PyObject *_wrap_XmpData_iterator_setValue__SWIG_1(PyObject *self, PyO SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData_iterator_setValue" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData_iterator_setValue" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData_iterator_setValue" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -6817,7 +6862,7 @@ SWIGINTERN int _wrap_new_Xmpdatum__SWIG_0(PyObject *self, PyObject *args, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Xmpdatum" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Xmpdatum" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_Xmpdatum" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } arg1 = reinterpret_cast< Exiv2::XmpKey * >(argp1); res2 = SWIG_ConvertPtr(obj2, &argp2,SWIGTYPE_p_Exiv2__Value, 0 | 0 ); @@ -6856,7 +6901,7 @@ SWIGINTERN int _wrap_new_Xmpdatum__SWIG_1(PyObject *self, PyObject *args, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Xmpdatum" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Xmpdatum" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_Xmpdatum" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } arg1 = reinterpret_cast< Exiv2::XmpKey * >(argp1); { @@ -6890,7 +6935,7 @@ SWIGINTERN int _wrap_new_Xmpdatum__SWIG_2(PyObject *self, PyObject *args, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Xmpdatum" "', argument " "1"" of type '" "Exiv2::Xmpdatum const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Xmpdatum" "', argument " "1"" of type '" "Exiv2::Xmpdatum const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_Xmpdatum" "', argument " "1"" of type '" "Exiv2::Xmpdatum const &""'"); } arg1 = reinterpret_cast< Exiv2::Xmpdatum * >(argp1); { @@ -7043,7 +7088,7 @@ SWIGINTERN PyObject *_wrap_Xmpdatum_setValue__SWIG_1(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Xmpdatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Xmpdatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Xmpdatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -8165,7 +8210,7 @@ SWIGINTERN PyObject *_wrap_XmpData_add__SWIG_0(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData_add" "', argument " "2"" of type '" "Exiv2::XmpKey const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData_add" "', argument " "2"" of type '" "Exiv2::XmpKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData_add" "', argument " "2"" of type '" "Exiv2::XmpKey const &""'"); } arg2 = reinterpret_cast< Exiv2::XmpKey * >(argp2); res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__Value, 0 | 0 ); @@ -8211,7 +8256,7 @@ SWIGINTERN PyObject *_wrap_XmpData_add__SWIG_1(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData_add" "', argument " "2"" of type '" "Exiv2::Xmpdatum const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData_add" "', argument " "2"" of type '" "Exiv2::Xmpdatum const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData_add" "', argument " "2"" of type '" "Exiv2::Xmpdatum const &""'"); } arg2 = reinterpret_cast< Exiv2::Xmpdatum * >(argp2); { @@ -8289,13 +8334,13 @@ SWIGINTERN PyObject *_wrap_XmpData_erase(PyObject *self, PyObject *args) { ; } if (!argp) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData_erase" "', argument " "2"" of type '" "XmpData_iterator_base""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData_erase" "', argument " "2"" of type '" "XmpData_iterator_base""'"); } arg2 = **argp; } { try { - result = (arg1)->erase(arg2); + result = (arg1)->erase(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -8345,7 +8390,7 @@ SWIGINTERN PyObject *_wrap_XmpData_eraseFamily(PyObject *self, PyObject *args) { ; } if (!argp) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData_eraseFamily" "', argument " "2"" of type '" "XmpData_iterator_base""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData_eraseFamily" "', argument " "2"" of type '" "XmpData_iterator_base""'"); } it2 = **argp; arg2 = &it2; @@ -8502,7 +8547,7 @@ SWIGINTERN PyObject *_wrap_XmpData_findKey(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData_findKey" "', argument " "2"" of type '" "Exiv2::XmpKey const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData_findKey" "', argument " "2"" of type '" "Exiv2::XmpKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData_findKey" "', argument " "2"" of type '" "Exiv2::XmpKey const &""'"); } arg2 = reinterpret_cast< Exiv2::XmpKey * >(argp2); { @@ -8699,7 +8744,7 @@ SWIGINTERN PyObject *_wrap_XmpData_setPacket(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData_setPacket" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData_setPacket" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData_setPacket" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -8773,7 +8818,7 @@ SWIGINTERN PyObject *_wrap_XmpData___getitem__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData___getitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData___getitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData___getitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -8828,7 +8873,7 @@ SWIGINTERN PyObject *_wrap_XmpData___setitem____SWIG_0(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -8881,7 +8926,7 @@ SWIGINTERN PyObject *_wrap_XmpData___setitem____SWIG_1(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -8892,7 +8937,7 @@ SWIGINTERN PyObject *_wrap_XmpData___setitem____SWIG_1(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "XmpData___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -8941,7 +8986,7 @@ SWIGINTERN PyObject *_wrap_XmpData___setitem____SWIG_2(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -8987,7 +9032,7 @@ SWIGINTERN PyObject *_wrap_XmpData___setitem____SWIG_3(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9092,7 +9137,7 @@ SWIGINTERN PyObject *_wrap_XmpData___contains__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData___contains__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData___contains__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData___contains__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9367,7 +9412,7 @@ SwigPyBuiltin__XmpData_iterator_base_richcompare(PyObject *self, PyObject *other PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); switch (op) { case Py_EQ : result = _wrap_XmpData_iterator_base___eq__(self, tuple); break; case Py_NE : result = _wrap_XmpData_iterator_base___ne__(self, tuple); break; @@ -9378,10 +9423,10 @@ SwigPyBuiltin__XmpData_iterator_base_richcompare(PyObject *self, PyObject *other result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -9394,42 +9439,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__XmpData_iterator_base_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__XmpData_iterator_base_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.xmp.XmpData_iterator_base", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_XmpData_iterator_base_destructor_closure, /* tp_dealloc */ + "exiv2.xmp.XmpData_iterator_base", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_XmpData_iterator_base_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__XmpData_iterator_base_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__XmpData_iterator_base_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__XmpData_iterator_base_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - _wrap_XmpData_iterator_base___str___reprfunc_closure, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__XmpData_iterator_base_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__XmpData_iterator_base_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__XmpData_iterator_base_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__XmpData_iterator_base_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + _wrap_XmpData_iterator_base___str___reprfunc_closure, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__XmpData_iterator_base_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -9437,176 +9483,295 @@ static PyHeapTypeObject SwigPyBuiltin__XmpData_iterator_base_type = { "\n" "Python wrapper for an :class:`XmpData` iterator that points to\n" "the 'end' value and can not be dereferenced.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__XmpData_iterator_base_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_XmpData_iterator_base___iter___getiterfunc_closure, /* tp_iter */ - _wrap_XmpData_iterator_base___next___iternextfunc_closure, /* tp_iternext */ - SwigPyBuiltin__XmpData_iterator_base_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__XmpData_iterator_base_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__XmpData_iterator_base_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_XmpData_iterator_base___iter___getiterfunc_closure, /* tp_iter */ + _wrap_XmpData_iterator_base___next___iternextfunc_closure, /* tp_iternext */ + SwigPyBuiltin__XmpData_iterator_base_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__XmpData_iterator_base_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__XmpData_iterator_base_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__XmpData_iterator_base_type}; +static PyTypeObject *SwigPyBuiltin__XmpData_iterator_base_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__XmpData_iterator_base_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpData_iterator_base'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__XmpData_iterator_base_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete_XmpData_iterator_base_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "\n" + "Python wrapper for an :class:`XmpData` iterator that points to\n" + "the 'end' value and can not be dereferenced.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)_wrap_XmpData_iterator_base___str___reprfunc_closure }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__XmpData_iterator_base_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__XmpData_iterator_base_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__XmpData_iterator_base_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)_wrap_XmpData_iterator_base___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)_wrap_XmpData_iterator_base___next___iternextfunc_closure }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.xmp.XmpData_iterator_base", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__XmpData_iterator_base_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet XmpData_iterator___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__XmpData_iterator_getset[] = { @@ -9620,7 +9785,7 @@ SwigPyBuiltin__XmpData_iterator_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); switch (op) { case Py_EQ : result = _wrap_XmpData_iterator_base___eq__(self, tuple); break; case Py_NE : result = _wrap_XmpData_iterator_base___ne__(self, tuple); break; @@ -9631,17 +9796,17 @@ SwigPyBuiltin__XmpData_iterator_richcompare(PyObject *self, PyObject *other, int result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } SWIGINTERN PyMethodDef SwigPyBuiltin__XmpData_iterator_methods[] = { { "__deref__", _wrap_XmpData_iterator___deref__, METH_VARARGS, "" }, { "setValue", _wrap_XmpData_iterator_setValue, METH_VARARGS, "" }, - { "copy", _wrap_XmpData_iterator_copy, METH_VARARGS, " Not implemented. Calling this method will raise an exception." }, + { "copy", _wrap_XmpData_iterator_copy, METH_VARARGS, "Not implemented. Calling this method will raise an exception." }, { "write", _wrap_XmpData_iterator_write, METH_VARARGS, "" }, { "key", _wrap_XmpData_iterator_key, METH_VARARGS, "\n" "Return the key of the Xmpdatum. The key is of the form\n" @@ -9650,13 +9815,13 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__XmpData_iterator_methods[] = { " contain multiple metadata with the same key.\n" "" }, { "familyName", _wrap_XmpData_iterator_familyName, METH_VARARGS, "" }, - { "groupName", _wrap_XmpData_iterator_groupName, METH_VARARGS, " Return the (preferred) schema namespace prefix." }, - { "tagName", _wrap_XmpData_iterator_tagName, METH_VARARGS, " Return the property name." }, + { "groupName", _wrap_XmpData_iterator_groupName, METH_VARARGS, "Return the (preferred) schema namespace prefix." }, + { "tagName", _wrap_XmpData_iterator_tagName, METH_VARARGS, "Return the property name." }, { "tagLabel", _wrap_XmpData_iterator_tagLabel, METH_VARARGS, "" }, - { "tag", _wrap_XmpData_iterator_tag, METH_VARARGS, " Properties don't have a tag number. Return 0." }, + { "tag", _wrap_XmpData_iterator_tag, METH_VARARGS, "Properties don't have a tag number. Return 0." }, { "typeId", _wrap_XmpData_iterator_typeId, METH_VARARGS, "" }, { "typeName", _wrap_XmpData_iterator_typeName, METH_VARARGS, "" }, - { "typeSize", _wrap_XmpData_iterator_typeSize, METH_VARARGS, " The Exif typeSize doesn't make sense here. Return 0." }, + { "typeSize", _wrap_XmpData_iterator_typeSize, METH_VARARGS, "The Exif typeSize doesn't make sense here. Return 0." }, { "count", _wrap_XmpData_iterator_count, METH_VARARGS, "" }, { "size", _wrap_XmpData_iterator_size, METH_VARARGS, "" }, { "toString", _wrap_XmpData_iterator_toString, METH_VARARGS, "" }, @@ -9674,42 +9839,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__XmpData_iterator_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__XmpData_iterator_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.xmp.XmpData_iterator", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_XmpData_iterator_destructor_closure, /* tp_dealloc */ + "exiv2.xmp.XmpData_iterator", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_XmpData_iterator_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__XmpData_iterator_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__XmpData_iterator_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__XmpData_iterator_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__XmpData_iterator_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__XmpData_iterator_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__XmpData_iterator_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__XmpData_iterator_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__XmpData_iterator_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -9718,176 +9884,296 @@ static PyHeapTypeObject SwigPyBuiltin__XmpData_iterator_type = { "Python wrapper for an :class:`XmpData` iterator. It has most of\n" "the methods of :class:`Xmpdatum` allowing easy access to the\n" "data it points to.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__XmpData_iterator_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__XmpData_iterator_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__XmpData_iterator_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__XmpData_iterator_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__XmpData_iterator_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__XmpData_iterator_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__XmpData_iterator_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__XmpData_iterator_type}; +static PyTypeObject *SwigPyBuiltin__XmpData_iterator_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__XmpData_iterator_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpData_iterator'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__XmpData_iterator_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete_XmpData_iterator_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "\n" + "Python wrapper for an :class:`XmpData` iterator. It has most of\n" + "the methods of :class:`Xmpdatum` allowing easy access to the\n" + "data it points to.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__XmpData_iterator_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__XmpData_iterator_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__XmpData_iterator_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.xmp.XmpData_iterator", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__XmpData_iterator_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet Xmpdatum___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__Xmpdatum_getset[] = { @@ -9921,22 +10207,22 @@ SwigPyBuiltin__Exiv2__Xmpdatum_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Xmpdatum_methods[] = { { "setValue", _wrap_Xmpdatum_setValue, METH_VARARGS, "" }, - { "copy", _wrap_Xmpdatum_copy, METH_VARARGS, " Not implemented. Calling this method will raise an exception." }, + { "copy", _wrap_Xmpdatum_copy, METH_VARARGS, "Not implemented. Calling this method will raise an exception." }, { "write", _wrap_Xmpdatum_write, METH_VARARGS, "" }, { "key", _wrap_Xmpdatum_key, METH_VARARGS, "\n" "Return the key of the Xmpdatum. The key is of the form\n" @@ -9945,13 +10231,13 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Xmpdatum_methods[] = { " contain multiple metadata with the same key.\n" "" }, { "familyName", _wrap_Xmpdatum_familyName, METH_VARARGS, "" }, - { "groupName", _wrap_Xmpdatum_groupName, METH_VARARGS, " Return the (preferred) schema namespace prefix." }, - { "tagName", _wrap_Xmpdatum_tagName, METH_VARARGS, " Return the property name." }, + { "groupName", _wrap_Xmpdatum_groupName, METH_VARARGS, "Return the (preferred) schema namespace prefix." }, + { "tagName", _wrap_Xmpdatum_tagName, METH_VARARGS, "Return the property name." }, { "tagLabel", _wrap_Xmpdatum_tagLabel, METH_VARARGS, "" }, - { "tag", _wrap_Xmpdatum_tag, METH_VARARGS, " Properties don't have a tag number. Return 0." }, + { "tag", _wrap_Xmpdatum_tag, METH_VARARGS, "Properties don't have a tag number. Return 0." }, { "typeId", _wrap_Xmpdatum_typeId, METH_VARARGS, "" }, { "typeName", _wrap_Xmpdatum_typeName, METH_VARARGS, "" }, - { "typeSize", _wrap_Xmpdatum_typeSize, METH_VARARGS, " The Exif typeSize doesn't make sense here. Return 0." }, + { "typeSize", _wrap_Xmpdatum_typeSize, METH_VARARGS, "The Exif typeSize doesn't make sense here. Return 0." }, { "count", _wrap_Xmpdatum_count, METH_VARARGS, "" }, { "size", _wrap_Xmpdatum_size, METH_VARARGS, "" }, { "toString", _wrap_Xmpdatum_toString, METH_VARARGS, "" }, @@ -9964,222 +10250,341 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Xmpdatum_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__Xmpdatum_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.xmp.Xmpdatum", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ + "exiv2.xmp.Xmpdatum", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ _wrap_delete_Xmpdatum_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__Xmpdatum_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__Xmpdatum_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__Xmpdatum_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__Xmpdatum_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__Xmpdatum_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__Xmpdatum_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__Xmpdatum_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__Xmpdatum_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Information related to an XMP property. An XMP metadatum consists\n" " of an XmpKey and a Value and provides methods to manipulate these.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__Xmpdatum_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__Xmpdatum_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__Xmpdatum_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_Xmpdatum, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__Xmpdatum_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__Xmpdatum_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__Xmpdatum_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_Xmpdatum, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Xmpdatum_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__Xmpdatum_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__Xmpdatum_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Xmpdatum_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Xmpdatum'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__Xmpdatum_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_Xmpdatum }, + { Py_tp_dealloc, (void *)_wrap_delete_Xmpdatum_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Information related to an XMP property. An XMP metadatum consists\n" + " of an XmpKey and a Value and provides methods to manipulate these.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__Xmpdatum_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__Xmpdatum_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__Xmpdatum_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.xmp.Xmpdatum", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Xmpdatum_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet XmpData___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XmpData_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Default constructor", &XmpData___dict___getset }, + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"Default constructor", &XmpData___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -10189,16 +10594,16 @@ SwigPyBuiltin__Exiv2__XmpData_richcompare(PyObject *self, PyObject *other, int o PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -10225,16 +10630,16 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpData_methods[] = { " erases all following keys from the same family\n" " See: https://github.com/Exiv2/exiv2/issues/521\n" "" }, - { "clear", _wrap_XmpData_clear, METH_VARARGS, " Delete all Xmpdatum instances resulting in an empty container." }, - { "sortByKey", _wrap_XmpData_sortByKey, METH_VARARGS, " Sort metadata by key" }, - { "begin", _wrap_XmpData_begin, METH_VARARGS, " Begin of the metadata" }, - { "end", _wrap_XmpData_end, METH_VARARGS, " End of the metadata" }, + { "clear", _wrap_XmpData_clear, METH_VARARGS, "Delete all Xmpdatum instances resulting in an empty container." }, + { "sortByKey", _wrap_XmpData_sortByKey, METH_VARARGS, "Sort metadata by key" }, + { "begin", _wrap_XmpData_begin, METH_VARARGS, "Begin of the metadata" }, + { "end", _wrap_XmpData_end, METH_VARARGS, "End of the metadata" }, { "findKey", _wrap_XmpData_findKey, METH_VARARGS, "\n" "Find the first Xmpdatum with the given key, return an iterator\n" " to it.\n" "" }, - { "empty", _wrap_XmpData_empty, METH_VARARGS, " Return true if there is no XMP metadata" }, - { "count", _wrap_XmpData_count, METH_VARARGS, " Get the number of metadata entries" }, + { "empty", _wrap_XmpData_empty, METH_VARARGS, "Return true if there is no XMP metadata" }, + { "count", _wrap_XmpData_count, METH_VARARGS, "Get the number of metadata entries" }, { "usePacket", _wrap_XmpData_usePacket, METH_VARARGS, "\n" "*Overload 1:*\n" "are we to use the packet?\n" @@ -10244,7 +10649,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpData_methods[] = { "*Overload 2:*\n" "set usePacket_\n" "" }, - { "setPacket", _wrap_XmpData_setPacket, METH_VARARGS, " setPacket" }, + { "setPacket", _wrap_XmpData_setPacket, METH_VARARGS, "setPacket" }, { "xmpPacket", _wrap_XmpData_xmpPacket, METH_VARARGS, "" }, { "__getitem__", _wrap_XmpData___getitem__, METH_VARARGS, "" }, { "__setitem__", _wrap_XmpData___setitem__, METH_VARARGS, "" }, @@ -10252,42 +10657,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpData_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpData_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.xmp.XmpData", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_XmpData_destructor_closure, /* tp_dealloc */ + "exiv2.xmp.XmpData", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_XmpData_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XmpData_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XmpData_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XmpData_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XmpData_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__XmpData_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__XmpData_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__XmpData_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__XmpData_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -10300,176 +10706,300 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpData_type = { "- access metadata through keys and standard C++ iterators\n" "- add, modify and delete metadata\n" "- serialize XMP data to an XML block\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__XmpData_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_XmpData_begin_getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XmpData_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XmpData_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_XmpData, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__XmpData_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_XmpData_begin_getiterfunc_closure, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__XmpData_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__XmpData_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_XmpData, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - _wrap_XmpData_count_lenfunc_closure, /* mp_length */ - _wrap_XmpData___getitem___binaryfunc_closure, /* mp_subscript */ - _wrap_XmpData___setitem___objobjargproc_closure, /* mp_ass_subscript */ + _wrap_XmpData_count_lenfunc_closure, /* mp_length */ + _wrap_XmpData___getitem___binaryfunc_closure, /* mp_subscript */ + _wrap_XmpData___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - _wrap_XmpData___contains___objobjproc_closure, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + _wrap_XmpData___contains___objobjproc_closure, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpData_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpData_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpData_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpData_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpData'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpData_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_XmpData }, + { Py_tp_dealloc, (void *)_wrap_delete_XmpData_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "A container for XMP data. This is a top-level class of\n" + " the %Exiv2 library.\n" + "\n" + "Provide high-level access to the XMP data of an image:\n" + "- read XMP information from an XML block\n" + "- access metadata through keys and standard C++ iterators\n" + "- add, modify and delete metadata\n" + "- serialize XMP data to an XML block\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__XmpData_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__XmpData_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__XmpData_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)_wrap_XmpData_count_lenfunc_closure }, + { Py_mp_subscript, (void *)_wrap_XmpData___getitem___binaryfunc_closure }, + { Py_mp_ass_subscript, (void *)_wrap_XmpData___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_XmpData_begin_getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)_wrap_XmpData___contains___objobjproc_closure }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.xmp.XmpData", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpData_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet XmpParser___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XmpParser_getset[] = { @@ -10533,16 +11063,16 @@ SwigPyBuiltin__Exiv2__XmpParser_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -10607,42 +11137,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpParser_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpParser_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.xmp.XmpParser", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_XmpParser_destructor_closure,/* tp_dealloc */ + "exiv2.xmp.XmpParser", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_XmpParser_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XmpParser_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XmpParser_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XmpParser_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XmpParser_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__XmpParser_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__XmpParser_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__XmpParser_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__XmpParser_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -10650,176 +11181,295 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpParser_type = { "Stateless parser class for XMP packets. Images use this\n" " class to parse and serialize XMP packets. The parser uses\n" " the XMP toolkit to do the job.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__XmpParser_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XmpParser_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XmpParser_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_XmpParser, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__XmpParser_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__XmpParser_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__XmpParser_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_XmpParser, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpParser_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpParser_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpParser_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpParser_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpParser'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpParser_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_XmpParser }, + { Py_tp_dealloc, (void *)_wrap_delete_XmpParser_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Stateless parser class for XMP packets. Images use this\n" + " class to parse and serialize XMP packets. The parser uses\n" + " the XMP toolkit to do the job.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__XmpParser_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__XmpParser_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__XmpParser_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.xmp.XmpParser", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpParser_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -11422,7 +12072,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -11605,7 +12255,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -11631,31 +12281,27 @@ SWIG_init(void) { /* type '::XmpData_iterator_base' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__XmpData_iterator_base_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpData_iterator_base'."); + builtin_pytype = SwigPyBuiltin__XmpData_iterator_base_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__XmpData_iterator_base_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpData_iterator_base", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpData_iterator_base"); d = md; /* type '::XmpData_iterator' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__XmpData_iterator_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); { PyObject* module = PyImport_ImportModule("enum"); @@ -11667,8 +12313,6 @@ SWIG_init(void) { return NULL; } - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_XmpData_iterator_base"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -11682,27 +12326,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpData_iterator'."); + builtin_pytype = SwigPyBuiltin__XmpData_iterator_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__XmpData_iterator_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpData_iterator", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpData_iterator"); d = md; /* type 'Exiv2::Xmpdatum' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Xmpdatum_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Metadatum"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -11716,48 +12357,44 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'Xmpdatum'."); + builtin_pytype = SwigPyBuiltin__Exiv2__Xmpdatum_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__Xmpdatum_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "Xmpdatum", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "Xmpdatum"); d = md; /* type 'Exiv2::XmpData' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpData_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpData'."); + builtin_pytype = SwigPyBuiltin__Exiv2__XmpData_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__XmpData_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpData", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpData"); d = md; /* type 'Exiv2::XmpParser' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpParser_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "omitPacketWrapper",SWIG_From_int(static_cast< int >(Exiv2::XmpParser::omitPacketWrapper))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "readOnlyPacket",SWIG_From_int(static_cast< int >(Exiv2::XmpParser::readOnlyPacket))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "useCompactFormat",SWIG_From_int(static_cast< int >(Exiv2::XmpParser::useCompactFormat))); @@ -11765,22 +12402,20 @@ SWIG_init(void) { SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "exactPacketLength",SWIG_From_int(static_cast< int >(Exiv2::XmpParser::exactPacketLength))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "writeAliasComments",SWIG_From_int(static_cast< int >(Exiv2::XmpParser::writeAliasComments))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "omitAllFormatting",SWIG_From_int(static_cast< int >(Exiv2::XmpParser::omitAllFormatting))); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpParser'."); + builtin_pytype = SwigPyBuiltin__Exiv2__XmpParser_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__XmpParser_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpParser", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpParser"); d = md; diff --git a/src/swig-0_28_3/basicio.py b/src/swig-0_28_3/basicio.py index da6ee78b..009321b8 100644 --- a/src/swig-0_28_3/basicio.py +++ b/src/swig-0_28_3/basicio.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_28_3/basicio_wrap.cxx b/src/swig-0_28_3/basicio_wrap.cxx index c5a2c596..eda99b65 100644 --- a/src/swig-0_28_3/basicio_wrap.cxx +++ b/src/swig-0_28_3/basicio_wrap.cxx @@ -1,19 +1,20 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_THREADS #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_basicio" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -148,6 +149,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -201,11 +206,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -824,10 +842,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -846,10 +860,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -870,10 +885,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -903,6 +914,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -944,6 +968,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -965,14 +992,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1002,7 +1029,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1187,7 +1214,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1208,13 +1235,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1224,7 +1251,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1232,11 +1259,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1245,12 +1272,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1374,21 +1401,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1453,7 +1480,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1469,9 +1496,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1504,9 +1531,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1607,7 +1637,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1650,27 +1680,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1694,10 +1724,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1725,7 +1755,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1754,10 +1784,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1784,14 +1814,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1821,7 +1851,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1860,15 +1890,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1912,7 +1945,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1923,7 +1956,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1931,13 +1964,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1950,7 +1983,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1959,7 +1992,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1993,9 +2026,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2016,7 +2049,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2076,9 +2109,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2134,9 +2167,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2166,7 +2202,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2189,7 +2225,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2247,16 +2283,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2270,13 +2309,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2292,9 +2331,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2350,9 +2389,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2399,7 +2441,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2452,7 +2494,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2479,7 +2526,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2489,7 +2536,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2615,7 +2662,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2653,8 +2700,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2714,13 +2761,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2737,24 +2784,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2791,7 +2838,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2855,7 +2902,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2924,11 +2971,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2948,10 +2995,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2971,11 +3018,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2999,15 +3046,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3039,6 +3086,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3065,8 +3113,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3110,7 +3158,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3125,20 +3173,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3211,7 +3259,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3243,11 +3291,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3265,15 +3313,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3423,6 +3471,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3514,6 +3565,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3537,19 +3591,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3559,23 +3613,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3613,7 +3665,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3622,15 +3674,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3645,7 +3697,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3669,10 +3721,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3688,14 +3740,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3721,7 +3773,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3738,7 +3790,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3756,13 +3808,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3778,7 +3830,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3792,7 +3844,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3809,13 +3861,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3831,12 +3883,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3851,7 +3903,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3866,16 +3918,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3902,7 +3954,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -3978,7 +4030,6 @@ static swig_module_info swig_module = {swig_types, 23, 0, 0, 0, 0}; # define SWIG_init init_basicio #endif -#define SWIG_name "_basicio" #ifdef __cplusplus #include @@ -4048,7 +4099,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4056,7 +4107,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4064,8 +4115,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4074,7 +4125,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4097,7 +4148,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4111,11 +4162,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4269,7 +4318,7 @@ static void _set_python_exception() { Py_DECREF(args); } - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4997,7 +5046,7 @@ SWIGINTERN PyObject *_wrap_BasicIo_write__SWIG_0(PyObject *self, PyObject *args) try { { SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->write((Exiv2::byte const *)arg2,arg3); + result = (arg1)->write((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3)); SWIG_PYTHON_THREAD_END_ALLOW; } } @@ -5041,7 +5090,7 @@ SWIGINTERN PyObject *_wrap_BasicIo_write__SWIG_1(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BasicIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BasicIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "BasicIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); } arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); { @@ -5170,7 +5219,7 @@ SWIGINTERN PyObject *_wrap_BasicIo_read__SWIG_0(PyObject *self, PyObject *args) try { { SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->read(arg2); + result = (arg1)->read(SWIG_STD_MOVE(arg2)); SWIG_PYTHON_THREAD_END_ALLOW; } } @@ -5234,7 +5283,7 @@ SWIGINTERN PyObject *_wrap_BasicIo_read__SWIG_1(PyObject *self, PyObject *args) try { { SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->read(arg2,arg3); + result = (arg1)->read(arg2,SWIG_STD_MOVE(arg3)); SWIG_PYTHON_THREAD_END_ALLOW; } } @@ -5343,7 +5392,7 @@ SWIGINTERN PyObject *_wrap_BasicIo_readOrThrow(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BasicIo_readOrThrow" "', argument " "4"" of type '" "ErrorCode""'"); } if (!argp4) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BasicIo_readOrThrow" "', argument " "4"" of type '" "ErrorCode""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "BasicIo_readOrThrow" "', argument " "4"" of type '" "ErrorCode""'"); } else { ErrorCode * temp = reinterpret_cast< ErrorCode * >(argp4); arg4 = *temp; @@ -5359,7 +5408,7 @@ SWIGINTERN PyObject *_wrap_BasicIo_readOrThrow(PyObject *self, PyObject *args) { } { try { - (arg1)->readOrThrow(arg2,arg3,arg4); + (arg1)->readOrThrow(arg2,SWIG_STD_MOVE(arg3),SWIG_STD_MOVE(arg4)); } catch(std::exception const& e) { _set_python_exception(); @@ -5433,7 +5482,7 @@ SWIGINTERN PyObject *_wrap_BasicIo_transfer(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BasicIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BasicIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "BasicIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); } arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); { @@ -5563,7 +5612,7 @@ SWIGINTERN PyObject *_wrap_BasicIo_seekOrThrow(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BasicIo_seekOrThrow" "', argument " "4"" of type '" "ErrorCode""'"); } if (!argp4) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BasicIo_seekOrThrow" "', argument " "4"" of type '" "ErrorCode""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "BasicIo_seekOrThrow" "', argument " "4"" of type '" "ErrorCode""'"); } else { ErrorCode * temp = reinterpret_cast< ErrorCode * >(argp4); arg4 = *temp; @@ -5573,7 +5622,7 @@ SWIGINTERN PyObject *_wrap_BasicIo_seekOrThrow(PyObject *self, PyObject *args) { } { try { - (arg1)->seekOrThrow(arg2,arg3,arg4); + (arg1)->seekOrThrow(arg2,arg3,SWIG_STD_MOVE(arg4)); } catch(std::exception const& e) { _set_python_exception(); @@ -5871,16 +5920,16 @@ SwigPyBuiltin__Exiv2__BasicIo_richcompare(PyObject *self, PyObject *other, int o PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -6070,9 +6119,9 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__BasicIo_methods[] = { "\n" " -1 if failure;\n" "" }, - { "isopen", _wrap_BasicIo_isopen, METH_VARARGS, " Returns true if the IO source is open, otherwise false." }, - { "error", _wrap_BasicIo_error, METH_VARARGS, " Returns 0 if the IO source is in a valid state, otherwise nonzero." }, - { "eof", _wrap_BasicIo_eof, METH_VARARGS, " Returns true if the IO position has reached the end, otherwise false." }, + { "isopen", _wrap_BasicIo_isopen, METH_VARARGS, "Returns true if the IO source is open, otherwise false." }, + { "error", _wrap_BasicIo_error, METH_VARARGS, "Returns 0 if the IO source is in a valid state, otherwise nonzero." }, + { "eof", _wrap_BasicIo_eof, METH_VARARGS, "Returns true if the IO position has reached the end, otherwise false." }, { "path", _wrap_BasicIo_path, METH_VARARGS, "\n" "Return the path to the IO resource. Often used to form\n" " comprehensive error messages where only a BasicIo instance is\n" @@ -6089,42 +6138,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__BasicIo_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__BasicIo_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.basicio.BasicIo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_BasicIo_destructor_closure, /* tp_dealloc */ + "exiv2.basicio.BasicIo", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_BasicIo_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -6134,176 +6184,297 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__BasicIo_type = { "Designed to have semantics and names similar to those of C style FILE*\n" "operations. Subclasses should all behave the same so that they can be\n" "interchanged.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__BasicIo_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__BasicIo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__BasicIo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__BasicIo_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__BasicIo_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__BasicIo_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_BasicIo_size_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + _wrap_BasicIo_size_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - getbuffer_Exiv2_BasicIo, /* bf_getbuffer */ - releasebuffer_Exiv2_BasicIo, /* bf_releasebuffer */ + getbuffer_Exiv2_BasicIo, /* bf_getbuffer */ + releasebuffer_Exiv2_BasicIo, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__BasicIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__BasicIo_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__BasicIo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__BasicIo_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'BasicIo'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__BasicIo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete_BasicIo_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "An interface for simple binary IO.\n" + "\n" + "Designed to have semantics and names similar to those of C style FILE*\n" + "operations. Subclasses should all behave the same so that they can be\n" + "interchanged.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__BasicIo_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__BasicIo_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__BasicIo_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_BasicIo_size_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.basicio.BasicIo", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__BasicIo_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -6709,7 +6880,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -6892,7 +7063,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -6918,8 +7089,7 @@ SWIG_init(void) { /* type 'Exiv2::BasicIo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__BasicIo_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); { PyObject* module = PyImport_ImportModule("enum"); @@ -6933,22 +7103,20 @@ SWIG_init(void) { SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "Position",_create_enum_Exiv2_BasicIo_Position( "Position", "Seek starting positions.", _get_enum_list(0, "beg",Exiv2::BasicIo::beg,"cur",Exiv2::BasicIo::cur,"end",Exiv2::BasicIo::end, NULL))); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'BasicIo'."); + builtin_pytype = SwigPyBuiltin__Exiv2__BasicIo_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__BasicIo_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "BasicIo", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "BasicIo"); d = md; diff --git a/src/swig-0_28_3/datasets.py b/src/swig-0_28_3/datasets.py index 80293823..5de4aa81 100644 --- a/src/swig-0_28_3/datasets.py +++ b/src/swig-0_28_3/datasets.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_28_3/datasets_wrap.cxx b/src/swig-0_28_3/datasets_wrap.cxx index c1c7432b..6992ae19 100644 --- a/src/swig-0_28_3/datasets_wrap.cxx +++ b/src/swig-0_28_3/datasets_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_datasets" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -4002,7 +4054,6 @@ static swig_module_info swig_module = {swig_types, 48, 0, 0, 0, 0}; # define SWIG_init init_datasets #endif -#define SWIG_name "_datasets" #ifdef __cplusplus #include @@ -4072,7 +4123,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4080,7 +4131,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4088,8 +4139,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4098,7 +4149,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4121,7 +4172,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4135,11 +4186,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4290,7 +4339,7 @@ static void _set_python_exception() { Py_DECREF(args); } - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4475,7 +4524,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -4498,10 +4547,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -4536,12 +4585,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -5124,7 +5169,7 @@ SWIGINTERN PyObject *_wrap_DataSet___getitem__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DataSet___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DataSet___getitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "DataSet___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -5169,7 +5214,7 @@ SWIGINTERN PyObject *_wrap_DataSet___setitem__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DataSet___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DataSet___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "DataSet___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -5358,7 +5403,7 @@ SWIGINTERN PyObject *_wrap_IptcDataSets_dataSet(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IptcDataSets_dataSet" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcDataSets_dataSet" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcDataSets_dataSet" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5481,7 +5526,7 @@ SWIGINTERN PyObject *_wrap_IptcDataSets_recordId(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IptcDataSets_recordId" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcDataSets_recordId" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcDataSets_recordId" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5513,7 +5558,7 @@ SWIGINTERN PyObject *_wrap_IptcDataSets_envelopeRecordList(PyObject *self, PyObj PyObject* list = pointer_to_list(result); if (!list) SWIG_fail; - resultobj = SWIG_Python_AppendOutput(resultobj, list); + resultobj = SWIG_Python_AppendOutput(resultobj, list, 0); } return resultobj; fail: @@ -5531,7 +5576,7 @@ SWIGINTERN PyObject *_wrap_IptcDataSets_application2RecordList(PyObject *self, P PyObject* list = pointer_to_list(result); if (!list) SWIG_fail; - resultobj = SWIG_Python_AppendOutput(resultobj, list); + resultobj = SWIG_Python_AppendOutput(resultobj, list, 0); } return resultobj; fail: @@ -5556,7 +5601,7 @@ SWIGINTERN int _wrap_new_IptcKey__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObj } { try { - result = (Exiv2::IptcKey *)new Exiv2::IptcKey(arg1); + result = (Exiv2::IptcKey *)new Exiv2::IptcKey(SWIG_STD_MOVE(arg1)); } catch(std::exception const& e) { _set_python_exception(); @@ -5882,18 +5927,18 @@ static SwigPyGetSet DataSet_recordId__getset = { _wrap_DataSet_recordId__get, 0 static SwigPyGetSet DataSet_mandatory__getset = { _wrap_DataSet_mandatory__get, 0 }; static SwigPyGetSet DataSet_minbytes__getset = { _wrap_DataSet_minbytes__get, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__DataSet_getset[] = { - { (char *)"title_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Dataset title or label", &DataSet_title__getset }, - { (char *)"photoshop_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Photoshop string", &DataSet_photoshop__getset }, - { (char *)"desc_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Dataset description", &DataSet_desc__getset }, - { (char *)"repeatable_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" True if dataset is repeatable", &DataSet_repeatable__getset }, - { (char *)"number_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Dataset number", &DataSet_number__getset }, - { (char *)"maxbytes_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Maximum number of bytes", &DataSet_maxbytes__getset }, - { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Dataset number", &DataSet___dict___getset }, - { (char *)"name_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Dataset name", &DataSet_name__getset }, - { (char *)"type_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Exiv2 default type", &DataSet_type__getset }, - { (char *)"recordId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Record id", &DataSet_recordId__getset }, - { (char *)"mandatory_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" True if dataset is mandatory", &DataSet_mandatory__getset }, - { (char *)"minbytes_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Minimum number of bytes", &DataSet_minbytes__getset }, + { (char *)"title_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Dataset title or label", &DataSet_title__getset }, + { (char *)"photoshop_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Photoshop string", &DataSet_photoshop__getset }, + { (char *)"desc_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Dataset description", &DataSet_desc__getset }, + { (char *)"repeatable_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"True if dataset is repeatable", &DataSet_repeatable__getset }, + { (char *)"number_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Dataset number", &DataSet_number__getset }, + { (char *)"maxbytes_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Maximum number of bytes", &DataSet_maxbytes__getset }, + { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Dataset number", &DataSet___dict___getset }, + { (char *)"name_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Dataset name", &DataSet_name__getset }, + { (char *)"type_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Exiv2 default type", &DataSet_type__getset }, + { (char *)"recordId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Record id", &DataSet_recordId__getset }, + { (char *)"mandatory_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"True if dataset is mandatory", &DataSet_mandatory__getset }, + { (char *)"minbytes_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Minimum number of bytes", &DataSet_minbytes__getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -5905,7 +5950,7 @@ SwigPyBuiltin__Exiv2__DataSet_richcompare(PyObject *self, PyObject *other, int o result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -5935,215 +5980,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DataSet_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__DataSet_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.datasets.DataSet", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.datasets.DataSet", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__DataSet_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__DataSet_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__DataSet_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__DataSet_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__DataSet_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__DataSet_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__DataSet_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__DataSet_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Details of an IPTC dataset.", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__DataSet_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_DataSet___iter___getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__DataSet_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__DataSet_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Details of an IPTC dataset.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__DataSet_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_DataSet___iter___getiterfunc_closure, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__DataSet_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__DataSet_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - _wrap_DataSet___getitem__, /* mp_subscript */ - _wrap_DataSet___setitem___objobjargproc_closure, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + _wrap_DataSet___getitem__, /* mp_subscript */ + _wrap_DataSet___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__DataSet_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__DataSet_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__DataSet_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__DataSet_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'DataSet'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__DataSet_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Details of an IPTC dataset." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__DataSet_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__DataSet_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__DataSet_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)_wrap_DataSet___getitem__ }, + { Py_mp_ass_subscript, (void *)_wrap_DataSet___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_DataSet___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.datasets.DataSet", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__DataSet_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet IptcDataSets___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__IptcDataSets_getset[] = { @@ -6169,7 +6330,7 @@ SwigPyBuiltin__Exiv2__IptcDataSets_richcompare(PyObject *self, PyObject *other, result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -6237,7 +6398,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__IptcDataSets_methods[] = { "\n" ":raises: Error if the *dataSetName* or *recordId* are invalid\n" "" }, - { "dataSetType", (PyCFunction)(void(*)(void))_wrap_IptcDataSets_dataSetType, METH_STATIC|METH_VARARGS, " Return the type for dataSet number and Record id" }, + { "dataSetType", (PyCFunction)(void(*)(void))_wrap_IptcDataSets_dataSetType, METH_STATIC|METH_VARARGS, "Return the type for dataSet number and Record id" }, { "recordName", (PyCFunction)(void(*)(void))_wrap_IptcDataSets_recordName, METH_STATIC|METH_O, "\n" "Return the name of the Record\n" ":type recordId: int\n" @@ -6262,220 +6423,336 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__IptcDataSets_methods[] = { ":return: the Id number of a Record\n" ":raises: Error if the record is not known;\n" "" }, - { "envelopeRecordList", (PyCFunction)(void(*)(void))_wrap_IptcDataSets_envelopeRecordList, METH_STATIC|METH_NOARGS, " Return read-only list of built-in Envelope Record datasets" }, - { "application2RecordList", (PyCFunction)(void(*)(void))_wrap_IptcDataSets_application2RecordList, METH_STATIC|METH_NOARGS, " Return read-only list of built-in Application2 Record datasets" }, + { "envelopeRecordList", (PyCFunction)(void(*)(void))_wrap_IptcDataSets_envelopeRecordList, METH_STATIC|METH_NOARGS, "Return read-only list of built-in Envelope Record datasets" }, + { "application2RecordList", (PyCFunction)(void(*)(void))_wrap_IptcDataSets_application2RecordList, METH_STATIC|METH_NOARGS, "Return read-only list of built-in Application2 Record datasets" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__IptcDataSets_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.datasets.IptcDataSets", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.datasets.IptcDataSets", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__IptcDataSets_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__IptcDataSets_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__IptcDataSets_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__IptcDataSets_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__IptcDataSets_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__IptcDataSets_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__IptcDataSets_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__IptcDataSets_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " IPTC dataset reference, implemented as a static class.", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__IptcDataSets_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__IptcDataSets_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__IptcDataSets_getset,/* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "IPTC dataset reference, implemented as a static class.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__IptcDataSets_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__IptcDataSets_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__IptcDataSets_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__IptcDataSets_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__IptcDataSets_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__IptcDataSets_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__IptcDataSets_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcDataSets'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__IptcDataSets_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"IPTC dataset reference, implemented as a static class." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__IptcDataSets_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__IptcDataSets_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__IptcDataSets_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.datasets.IptcDataSets", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__IptcDataSets_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet IptcKey___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__IptcKey_getset[] = { @@ -6511,7 +6788,7 @@ SwigPyBuiltin__Exiv2__IptcKey_richcompare(PyObject *self, PyObject *other, int o result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -6529,220 +6806,336 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__IptcKey_methods[] = { { "tagDesc", _wrap_IptcKey_tagDesc, METH_NOARGS, "" }, { "tag", _wrap_IptcKey_tag, METH_NOARGS, "" }, { "clone", _wrap_IptcKey_clone, METH_NOARGS, "" }, - { "recordName", _wrap_IptcKey_recordName, METH_NOARGS, " Return the name of the record" }, - { "record", _wrap_IptcKey_record, METH_NOARGS, " Return the record id" }, + { "recordName", _wrap_IptcKey_recordName, METH_NOARGS, "Return the name of the record" }, + { "record", _wrap_IptcKey_record, METH_NOARGS, "Return the record id" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__IptcKey_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.datasets.IptcKey", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_IptcKey_destructor_closure, /* tp_dealloc */ + "exiv2.datasets.IptcKey", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_IptcKey_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__IptcKey_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__IptcKey_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__IptcKey_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - _wrap_IptcKey_key_reprfunc_closure, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__IptcKey_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__IptcKey_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__IptcKey_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__IptcKey_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + _wrap_IptcKey_key_reprfunc_closure, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__IptcKey_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Concrete keys for IPTC metadata.", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__IptcKey_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__IptcKey_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__IptcKey_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_IptcKey, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Concrete keys for IPTC metadata.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__IptcKey_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__IptcKey_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__IptcKey_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_IptcKey, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__IptcKey_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__IptcKey_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__IptcKey_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__IptcKey_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcKey'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__IptcKey_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_IptcKey }, + { Py_tp_dealloc, (void *)_wrap_delete_IptcKey_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Concrete keys for IPTC metadata." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)_wrap_IptcKey_key_reprfunc_closure }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__IptcKey_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__IptcKey_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__IptcKey_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.datasets.IptcKey", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__IptcKey_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -7299,7 +7692,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -7482,7 +7875,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -7508,31 +7901,27 @@ SWIG_init(void) { /* type 'Exiv2::DataSet' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__DataSet_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'DataSet'."); + builtin_pytype = SwigPyBuiltin__Exiv2__DataSet_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__DataSet_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "DataSet", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "DataSet"); d = md; /* type 'Exiv2::IptcDataSets' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__IptcDataSets_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "invalidRecord",SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Exiv2::IptcDataSets::invalidRecord))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "envelope",SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Exiv2::IptcDataSets::envelope))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "application2",SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Exiv2::IptcDataSets::application2))); @@ -7607,31 +7996,26 @@ SWIG_init(void) { SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "PreviewFormat",SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Exiv2::IptcDataSets::PreviewFormat))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "PreviewVersion",SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Exiv2::IptcDataSets::PreviewVersion))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "Preview",SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Exiv2::IptcDataSets::Preview))); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcDataSets'."); + builtin_pytype = SwigPyBuiltin__Exiv2__IptcDataSets_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__IptcDataSets_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "IptcDataSets", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "IptcDataSets"); d = md; /* type 'Exiv2::IptcKey' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__IptcKey_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Key"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -7645,18 +8029,18 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcKey'."); + builtin_pytype = SwigPyBuiltin__Exiv2__IptcKey_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__IptcKey_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "IptcKey", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "IptcKey"); d = md; diff --git a/src/swig-0_28_3/easyaccess.py b/src/swig-0_28_3/easyaccess.py index 3e7d672a..504a872a 100644 --- a/src/swig-0_28_3/easyaccess.py +++ b/src/swig-0_28_3/easyaccess.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_28_3/easyaccess_wrap.cxx b/src/swig-0_28_3/easyaccess_wrap.cxx index aa1cc6cb..85b959a9 100644 --- a/src/swig-0_28_3/easyaccess_wrap.cxx +++ b/src/swig-0_28_3/easyaccess_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_easyaccess" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -3958,7 +4010,6 @@ static swig_module_info swig_module = {swig_types, 4, 0, 0, 0, 0}; # define SWIG_init init_easyaccess #endif -#define SWIG_name "_easyaccess" #ifdef __cplusplus #include @@ -4028,7 +4079,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4036,7 +4087,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4044,8 +4095,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4054,7 +4105,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4077,7 +4128,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4091,11 +4142,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4246,7 +4295,7 @@ static void _set_python_exception() { Py_DECREF(args); } - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4286,7 +4335,7 @@ SWIGINTERN PyObject *_wrap_orientation(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "orientation" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "orientation" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "orientation" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4330,7 +4379,7 @@ SWIGINTERN PyObject *_wrap_isoSpeed(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "isoSpeed" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "isoSpeed" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "isoSpeed" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4374,7 +4423,7 @@ SWIGINTERN PyObject *_wrap_dateTimeOriginal(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dateTimeOriginal" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dateTimeOriginal" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "dateTimeOriginal" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4422,7 +4471,7 @@ SWIGINTERN PyObject *_wrap_flashBias(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flashBias" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flashBias" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "flashBias" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4466,7 +4515,7 @@ SWIGINTERN PyObject *_wrap_exposureMode(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "exposureMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "exposureMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "exposureMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4510,7 +4559,7 @@ SWIGINTERN PyObject *_wrap_sceneMode(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sceneMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "sceneMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "sceneMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4554,7 +4603,7 @@ SWIGINTERN PyObject *_wrap_macroMode(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "macroMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "macroMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "macroMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4598,7 +4647,7 @@ SWIGINTERN PyObject *_wrap_imageQuality(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "imageQuality" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "imageQuality" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "imageQuality" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4642,7 +4691,7 @@ SWIGINTERN PyObject *_wrap_whiteBalance(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "whiteBalance" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "whiteBalance" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "whiteBalance" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4686,7 +4735,7 @@ SWIGINTERN PyObject *_wrap_lensName(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lensName" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "lensName" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "lensName" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4730,7 +4779,7 @@ SWIGINTERN PyObject *_wrap_saturation(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "saturation" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "saturation" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "saturation" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4774,7 +4823,7 @@ SWIGINTERN PyObject *_wrap_sharpness(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sharpness" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "sharpness" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "sharpness" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4818,7 +4867,7 @@ SWIGINTERN PyObject *_wrap_contrast(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "contrast" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "contrast" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "contrast" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4862,7 +4911,7 @@ SWIGINTERN PyObject *_wrap_sceneCaptureType(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sceneCaptureType" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "sceneCaptureType" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "sceneCaptureType" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4906,7 +4955,7 @@ SWIGINTERN PyObject *_wrap_meteringMode(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "meteringMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "meteringMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "meteringMode" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4950,7 +4999,7 @@ SWIGINTERN PyObject *_wrap_make(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "make" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "make" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "make" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -4994,7 +5043,7 @@ SWIGINTERN PyObject *_wrap_model(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "model" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "model" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "model" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5038,7 +5087,7 @@ SWIGINTERN PyObject *_wrap_exposureTime(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "exposureTime" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "exposureTime" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "exposureTime" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5082,7 +5131,7 @@ SWIGINTERN PyObject *_wrap_fNumber(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fNumber" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fNumber" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "fNumber" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5126,7 +5175,7 @@ SWIGINTERN PyObject *_wrap_shutterSpeedValue(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "shutterSpeedValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "shutterSpeedValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "shutterSpeedValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5174,7 +5223,7 @@ SWIGINTERN PyObject *_wrap_apertureValue(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "apertureValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "apertureValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "apertureValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5222,7 +5271,7 @@ SWIGINTERN PyObject *_wrap_brightnessValue(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "brightnessValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "brightnessValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "brightnessValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5270,7 +5319,7 @@ SWIGINTERN PyObject *_wrap_exposureBiasValue(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "exposureBiasValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "exposureBiasValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "exposureBiasValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5318,7 +5367,7 @@ SWIGINTERN PyObject *_wrap_maxApertureValue(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "maxApertureValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "maxApertureValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "maxApertureValue" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5366,7 +5415,7 @@ SWIGINTERN PyObject *_wrap_subjectDistance(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "subjectDistance" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "subjectDistance" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "subjectDistance" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5410,7 +5459,7 @@ SWIGINTERN PyObject *_wrap_lightSource(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lightSource" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "lightSource" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "lightSource" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5458,7 +5507,7 @@ SWIGINTERN PyObject *_wrap_flash(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flash" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flash" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "flash" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5506,7 +5555,7 @@ SWIGINTERN PyObject *_wrap_serialNumber(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "serialNumber" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "serialNumber" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "serialNumber" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5550,7 +5599,7 @@ SWIGINTERN PyObject *_wrap_focalLength(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "focalLength" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "focalLength" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "focalLength" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5594,7 +5643,7 @@ SWIGINTERN PyObject *_wrap_subjectArea(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "subjectArea" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "subjectArea" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "subjectArea" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5642,7 +5691,7 @@ SWIGINTERN PyObject *_wrap_flashEnergy(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flashEnergy" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flashEnergy" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "flashEnergy" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5690,7 +5739,7 @@ SWIGINTERN PyObject *_wrap_exposureIndex(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "exposureIndex" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "exposureIndex" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "exposureIndex" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5738,7 +5787,7 @@ SWIGINTERN PyObject *_wrap_sensingMethod(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sensingMethod" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "sensingMethod" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "sensingMethod" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5786,7 +5835,7 @@ SWIGINTERN PyObject *_wrap_afPoint(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "afPoint" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "afPoint" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "afPoint" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); @@ -5815,40 +5864,40 @@ SWIGINTERN PyObject *_wrap_afPoint(PyObject *self, PyObject *args) { static PyMethodDef SwigMethods[] = { - { "orientation", _wrap_orientation, METH_O, " Return the orientation of the image. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "isoSpeed", _wrap_isoSpeed, METH_O, " Return the ISO speed used to shoot the image. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time. Please note also that ISO speed function uses some computations, which might involve combining information from multiple tags and interpreting numeric codes. While the computations try to cover most cases, they can't be perfect and might fail in some circumstances, leading to imprecise results."}, - { "dateTimeOriginal", _wrap_dateTimeOriginal, METH_O, " Return the date and time when the original image data was generated. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "flashBias", _wrap_flashBias, METH_O, " Return the flash bias value. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "exposureMode", _wrap_exposureMode, METH_O, " Return the exposure mode setting. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "sceneMode", _wrap_sceneMode, METH_O, " Return the scene mode setting. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "macroMode", _wrap_macroMode, METH_O, " Return the macro mode setting. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "imageQuality", _wrap_imageQuality, METH_O, " Return the image quality setting. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "whiteBalance", _wrap_whiteBalance, METH_O, " Return the white balance setting. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "lensName", _wrap_lensName, METH_O, " Return the name of the lens used. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time. Please note also that lens name function uses some heuristics to reconstruct the lens name, which might involve combining information from multiple tags and interpreting numeric codes. While the heuristics try to cover most cases, they can't be perfect and might fail in some circumstances, leading to imprecise results."}, - { "saturation", _wrap_saturation, METH_O, " Return the saturation level. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "sharpness", _wrap_sharpness, METH_O, " Return the sharpness level. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "contrast", _wrap_contrast, METH_O, " Return the contrast level. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "sceneCaptureType", _wrap_sceneCaptureType, METH_O, " Return the scene capture type. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "meteringMode", _wrap_meteringMode, METH_O, " Return the metering mode setting. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "make", _wrap_make, METH_O, " Return the camera make. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "model", _wrap_model, METH_O, " Return the camera model. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "exposureTime", _wrap_exposureTime, METH_O, " Return the exposure time. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "fNumber", _wrap_fNumber, METH_O, " Return the F number. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "shutterSpeedValue", _wrap_shutterSpeedValue, METH_O, " Return the shutter speed value. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "apertureValue", _wrap_apertureValue, METH_O, " Return the aperture value. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "brightnessValue", _wrap_brightnessValue, METH_O, " Return the brightness value. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "exposureBiasValue", _wrap_exposureBiasValue, METH_O, " Return the exposure bias value. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "maxApertureValue", _wrap_maxApertureValue, METH_O, " Return the max aperture value. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "subjectDistance", _wrap_subjectDistance, METH_O, " Return the subject distance. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "lightSource", _wrap_lightSource, METH_O, " Return the kind of light source. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "flash", _wrap_flash, METH_O, " Return the status of flash. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "serialNumber", _wrap_serialNumber, METH_O, " Return the camera serial number. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "focalLength", _wrap_focalLength, METH_O, " Return the focal length setting. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "subjectArea", _wrap_subjectArea, METH_O, " Return the subject location and area. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "flashEnergy", _wrap_flashEnergy, METH_O, " Return the flash energy. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "exposureIndex", _wrap_exposureIndex, METH_O, " Return the exposure index. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "sensingMethod", _wrap_sensingMethod, METH_O, " Return the image sensor type. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, - { "afPoint", _wrap_afPoint, METH_O, " Return the AF point. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "orientation", _wrap_orientation, METH_O, "Return the orientation of the image. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "isoSpeed", _wrap_isoSpeed, METH_O, "Return the ISO speed used to shoot the image. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time. Please note also that ISO speed function uses some computations, which might involve combining information from multiple tags and interpreting numeric codes. While the computations try to cover most cases, they can't be perfect and might fail in some circumstances, leading to imprecise results."}, + { "dateTimeOriginal", _wrap_dateTimeOriginal, METH_O, "Return the date and time when the original image data was generated. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "flashBias", _wrap_flashBias, METH_O, "Return the flash bias value. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "exposureMode", _wrap_exposureMode, METH_O, "Return the exposure mode setting. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "sceneMode", _wrap_sceneMode, METH_O, "Return the scene mode setting. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "macroMode", _wrap_macroMode, METH_O, "Return the macro mode setting. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "imageQuality", _wrap_imageQuality, METH_O, "Return the image quality setting. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "whiteBalance", _wrap_whiteBalance, METH_O, "Return the white balance setting. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "lensName", _wrap_lensName, METH_O, "Return the name of the lens used. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time. Please note also that lens name function uses some heuristics to reconstruct the lens name, which might involve combining information from multiple tags and interpreting numeric codes. While the heuristics try to cover most cases, they can't be perfect and might fail in some circumstances, leading to imprecise results."}, + { "saturation", _wrap_saturation, METH_O, "Return the saturation level. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "sharpness", _wrap_sharpness, METH_O, "Return the sharpness level. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "contrast", _wrap_contrast, METH_O, "Return the contrast level. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "sceneCaptureType", _wrap_sceneCaptureType, METH_O, "Return the scene capture type. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "meteringMode", _wrap_meteringMode, METH_O, "Return the metering mode setting. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "make", _wrap_make, METH_O, "Return the camera make. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "model", _wrap_model, METH_O, "Return the camera model. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "exposureTime", _wrap_exposureTime, METH_O, "Return the exposure time. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "fNumber", _wrap_fNumber, METH_O, "Return the F number. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "shutterSpeedValue", _wrap_shutterSpeedValue, METH_O, "Return the shutter speed value. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "apertureValue", _wrap_apertureValue, METH_O, "Return the aperture value. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "brightnessValue", _wrap_brightnessValue, METH_O, "Return the brightness value. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "exposureBiasValue", _wrap_exposureBiasValue, METH_O, "Return the exposure bias value. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "maxApertureValue", _wrap_maxApertureValue, METH_O, "Return the max aperture value. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "subjectDistance", _wrap_subjectDistance, METH_O, "Return the subject distance. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "lightSource", _wrap_lightSource, METH_O, "Return the kind of light source. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "flash", _wrap_flash, METH_O, "Return the status of flash. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "serialNumber", _wrap_serialNumber, METH_O, "Return the camera serial number. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "focalLength", _wrap_focalLength, METH_O, "Return the focal length setting. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "subjectArea", _wrap_subjectArea, METH_O, "Return the subject location and area. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "flashEnergy", _wrap_flashEnergy, METH_O, "Return the flash energy. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "exposureIndex", _wrap_exposureIndex, METH_O, "Return the exposure index. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "sensingMethod", _wrap_sensingMethod, METH_O, "Return the image sensor type. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, + { "afPoint", _wrap_afPoint, METH_O, "Return the AF point. Please keep in mind that this accessor is provided for convenience only and will return expected/desired metadata most of the time."}, { NULL, NULL, 0, NULL } }; @@ -6151,7 +6200,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -6334,7 +6383,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) diff --git a/src/swig-0_28_3/error.py b/src/swig-0_28_3/error.py index 5e2ba745..d6d37f05 100644 --- a/src/swig-0_28_3/error.py +++ b/src/swig-0_28_3/error.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_28_3/error_wrap.cxx b/src/swig-0_28_3/error_wrap.cxx index af2bb1e3..08e66e7f 100644 --- a/src/swig-0_28_3/error_wrap.cxx +++ b/src/swig-0_28_3/error_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_error" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -3960,7 +4012,6 @@ static swig_module_info swig_module = {swig_types, 6, 0, 0, 0, 0}; # define SWIG_init init_error #endif -#define SWIG_name "_error" #ifdef __cplusplus #include @@ -4030,7 +4081,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4038,7 +4089,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4046,8 +4097,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4056,7 +4107,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4079,7 +4130,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4093,11 +4144,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4414,7 +4463,7 @@ SwigPyBuiltin__Exiv2__LogMsg_richcompare(PyObject *self, PyObject *other, int op result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -4432,47 +4481,48 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__LogMsg_methods[] = { " messages to standard error. To suppress all log messages, set\n" " the log message handler to 0 (or set the log level to ``mute)``.\n" "" }, - { "level", (PyCFunction)(void(*)(void))_wrap_LogMsg_level, METH_STATIC|METH_NOARGS, " Return the current log level" }, - { "handler", (PyCFunction)(void(*)(void))_wrap_LogMsg_handler, METH_STATIC|METH_NOARGS, " Return the current log message handler" }, + { "level", (PyCFunction)(void(*)(void))_wrap_LogMsg_level, METH_STATIC|METH_NOARGS, "Return the current log level" }, + { "handler", (PyCFunction)(void(*)(void))_wrap_LogMsg_handler, METH_STATIC|METH_NOARGS, "Return the current log message handler" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__LogMsg_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.error.LogMsg", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.error.LogMsg", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__LogMsg_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__LogMsg_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__LogMsg_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__LogMsg_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__LogMsg_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__LogMsg_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__LogMsg_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__LogMsg_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -4502,176 +4552,317 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__LogMsg_type = { "\n" " Caveat: The entire log message is not processed in this case. So don't\n" " make that call any logic that always needs to be executed.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ SwigPyBuiltin__Exiv2__LogMsg_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__LogMsg_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__LogMsg_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__LogMsg_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__LogMsg_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__LogMsg_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__LogMsg_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__LogMsg_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__LogMsg_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'LogMsg'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__LogMsg_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Class for a log message, used by the library. Applications can set\n" + " the log level and provide a customer log message handler (callback\n" + " function).\n" + "\n" + " This class is meant to be used as a temporary object with the\n" + " related macro-magic like this:\n" + "\n" + " ``\n" + " EXV_WARNING << \"Warning! Something looks fishy.\\n\";\n" + " ``\n" + "\n" + " which translates to\n" + "\n" + " ``\n" + " if (LogMsg::warn >= LogMsg::level() && LogMsg::handler())\n" + " LogMsg(LogMsg::warn).os() << \"Warning! Something looks fishy.\\n\";\n" + " ``\n" + "\n" + " The macros EXV_DEBUG, EXV_INFO, EXV_WARNING and EXV_ERROR are\n" + " shorthands and ensure efficient use of the logging facility: If a\n" + " log message doesn't need to be generated because of the log level\n" + " setting, the temp object is not even created.\n" + "\n" + " Caveat: The entire log message is not processed in this case. So don't\n" + " make that call any logic that always needs to be executed.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__LogMsg_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__LogMsg_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__LogMsg_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.error.LogMsg", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__LogMsg_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -4985,7 +5176,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -5168,7 +5359,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -5214,8 +5405,7 @@ SWIG_init(void) { "ErrorCode", "Complete list of all Exiv2 error codes.", _get_enum_list(0, "kerSuccess",Exiv2::ErrorCode::kerSuccess,"kerGeneralError",Exiv2::ErrorCode::kerGeneralError,"kerErrorMessage",Exiv2::ErrorCode::kerErrorMessage,"kerCallFailed",Exiv2::ErrorCode::kerCallFailed,"kerNotAnImage",Exiv2::ErrorCode::kerNotAnImage,"kerInvalidDataset",Exiv2::ErrorCode::kerInvalidDataset,"kerInvalidRecord",Exiv2::ErrorCode::kerInvalidRecord,"kerInvalidKey",Exiv2::ErrorCode::kerInvalidKey,"kerInvalidTag",Exiv2::ErrorCode::kerInvalidTag,"kerValueNotSet",Exiv2::ErrorCode::kerValueNotSet,"kerDataSourceOpenFailed",Exiv2::ErrorCode::kerDataSourceOpenFailed,"kerFileOpenFailed",Exiv2::ErrorCode::kerFileOpenFailed,"kerFileContainsUnknownImageType",Exiv2::ErrorCode::kerFileContainsUnknownImageType,"kerMemoryContainsUnknownImageType",Exiv2::ErrorCode::kerMemoryContainsUnknownImageType,"kerUnsupportedImageType",Exiv2::ErrorCode::kerUnsupportedImageType,"kerFailedToReadImageData",Exiv2::ErrorCode::kerFailedToReadImageData,"kerNotAJpeg",Exiv2::ErrorCode::kerNotAJpeg,"kerFailedToMapFileForReadWrite",Exiv2::ErrorCode::kerFailedToMapFileForReadWrite,"kerFileRenameFailed",Exiv2::ErrorCode::kerFileRenameFailed,"kerTransferFailed",Exiv2::ErrorCode::kerTransferFailed,"kerMemoryTransferFailed",Exiv2::ErrorCode::kerMemoryTransferFailed,"kerInputDataReadFailed",Exiv2::ErrorCode::kerInputDataReadFailed,"kerImageWriteFailed",Exiv2::ErrorCode::kerImageWriteFailed,"kerNoImageInInputData",Exiv2::ErrorCode::kerNoImageInInputData,"kerInvalidIfdId",Exiv2::ErrorCode::kerInvalidIfdId,"kerValueTooLarge",Exiv2::ErrorCode::kerValueTooLarge,"kerDataAreaValueTooLarge",Exiv2::ErrorCode::kerDataAreaValueTooLarge,"kerOffsetOutOfRange",Exiv2::ErrorCode::kerOffsetOutOfRange,"kerUnsupportedDataAreaOffsetType",Exiv2::ErrorCode::kerUnsupportedDataAreaOffsetType,"kerInvalidCharset",Exiv2::ErrorCode::kerInvalidCharset,"kerUnsupportedDateFormat",Exiv2::ErrorCode::kerUnsupportedDateFormat,"kerUnsupportedTimeFormat",Exiv2::ErrorCode::kerUnsupportedTimeFormat,"kerWritingImageFormatUnsupported",Exiv2::ErrorCode::kerWritingImageFormatUnsupported,"kerInvalidSettingForImage",Exiv2::ErrorCode::kerInvalidSettingForImage,"kerNotACrwImage",Exiv2::ErrorCode::kerNotACrwImage,"kerFunctionNotSupported",Exiv2::ErrorCode::kerFunctionNotSupported,"kerNoNamespaceInfoForXmpPrefix",Exiv2::ErrorCode::kerNoNamespaceInfoForXmpPrefix,"kerNoPrefixForNamespace",Exiv2::ErrorCode::kerNoPrefixForNamespace,"kerTooLargeJpegSegment",Exiv2::ErrorCode::kerTooLargeJpegSegment,"kerUnhandledXmpdatum",Exiv2::ErrorCode::kerUnhandledXmpdatum,"kerUnhandledXmpNode",Exiv2::ErrorCode::kerUnhandledXmpNode,"kerXMPToolkitError",Exiv2::ErrorCode::kerXMPToolkitError,"kerDecodeLangAltPropertyFailed",Exiv2::ErrorCode::kerDecodeLangAltPropertyFailed,"kerDecodeLangAltQualifierFailed",Exiv2::ErrorCode::kerDecodeLangAltQualifierFailed,"kerEncodeLangAltPropertyFailed",Exiv2::ErrorCode::kerEncodeLangAltPropertyFailed,"kerPropertyNameIdentificationFailed",Exiv2::ErrorCode::kerPropertyNameIdentificationFailed,"kerSchemaNamespaceNotRegistered",Exiv2::ErrorCode::kerSchemaNamespaceNotRegistered,"kerNoNamespaceForPrefix",Exiv2::ErrorCode::kerNoNamespaceForPrefix,"kerAliasesNotSupported",Exiv2::ErrorCode::kerAliasesNotSupported,"kerInvalidXmpText",Exiv2::ErrorCode::kerInvalidXmpText,"kerTooManyTiffDirectoryEntries",Exiv2::ErrorCode::kerTooManyTiffDirectoryEntries,"kerMultipleTiffArrayElementTagsInDirectory",Exiv2::ErrorCode::kerMultipleTiffArrayElementTagsInDirectory,"kerWrongTiffArrayElementTagType",Exiv2::ErrorCode::kerWrongTiffArrayElementTagType,"kerInvalidKeyXmpValue",Exiv2::ErrorCode::kerInvalidKeyXmpValue,"kerInvalidIccProfile",Exiv2::ErrorCode::kerInvalidIccProfile,"kerInvalidXMP",Exiv2::ErrorCode::kerInvalidXMP,"kerTiffDirectoryTooLarge",Exiv2::ErrorCode::kerTiffDirectoryTooLarge,"kerInvalidTypeValue",Exiv2::ErrorCode::kerInvalidTypeValue,"kerInvalidLangAltValue",Exiv2::ErrorCode::kerInvalidLangAltValue,"kerInvalidMalloc",Exiv2::ErrorCode::kerInvalidMalloc,"kerCorruptedMetadata",Exiv2::ErrorCode::kerCorruptedMetadata,"kerArithmeticOverflow",Exiv2::ErrorCode::kerArithmeticOverflow,"kerMallocFailed",Exiv2::ErrorCode::kerMallocFailed,"kerInvalidIconvEncoding",Exiv2::ErrorCode::kerInvalidIconvEncoding,"kerErrorCount",Exiv2::ErrorCode::kerErrorCount, NULL))); /* type 'Exiv2::LogMsg' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__LogMsg_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "pythonHandler",SWIG_NewFunctionPtrObj( (void*)log_to_python, SWIGTYPE_p_f_int_p_q_const__char__void)); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "defaultHandler",SWIG_NewFunctionPtrObj( @@ -5225,22 +5415,20 @@ SWIG_init(void) { "Level", "Defined log levels.\n" "\nTo suppress all log messages, either set the log level to mute or set" "\nthe log message handler to None.", _get_enum_list(0, "debug",Exiv2::LogMsg::debug,"info",Exiv2::LogMsg::info,"warn",Exiv2::LogMsg::warn,"error",Exiv2::LogMsg::error,"mute",Exiv2::LogMsg::mute, NULL))); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'LogMsg'."); + builtin_pytype = SwigPyBuiltin__Exiv2__LogMsg_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__LogMsg_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "LogMsg", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "LogMsg"); d = md; diff --git a/src/swig-0_28_3/exif.py b/src/swig-0_28_3/exif.py index 20b8ef40..3328ff7e 100644 --- a/src/swig-0_28_3/exif.py +++ b/src/swig-0_28_3/exif.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_28_3/exif_wrap.cxx b/src/swig-0_28_3/exif_wrap.cxx index b5b028e1..da08caa2 100644 --- a/src/swig-0_28_3/exif_wrap.cxx +++ b/src/swig-0_28_3/exif_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_exif" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -4012,7 +4064,6 @@ static swig_module_info swig_module = {swig_types, 58, 0, 0, 0, 0}; # define SWIG_init init_exif #endif -#define SWIG_name "_exif" #ifdef __cplusplus #include @@ -4082,7 +4133,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4090,7 +4141,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4098,8 +4149,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4108,7 +4159,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4131,7 +4182,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4145,11 +4196,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4306,7 +4355,7 @@ static void _set_python_exception() { Py_DECREF(args); } - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4442,7 +4491,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -4465,10 +4514,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -4503,12 +4552,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -5340,7 +5385,7 @@ SwigPython_std_pair_repr (PyObject *o) PyTuple_SET_ITEM(tuple, 0, PyObject_GetAttrString(o, (char*) "first")); PyTuple_SET_ITEM(tuple, 1, PyObject_GetAttrString(o, (char*) "second")); PyObject *result = PyObject_Repr(tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -5664,7 +5709,7 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_base___eq__(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData_iterator_base___eq__" "', argument " "2"" of type '" "ExifData_iterator_base const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData_iterator_base___eq__" "', argument " "2"" of type '" "ExifData_iterator_base const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData_iterator_base___eq__" "', argument " "2"" of type '" "ExifData_iterator_base const &""'"); } arg2 = reinterpret_cast< ExifData_iterator_base * >(argp2); result = (bool)((ExifData_iterator_base const *)arg1)->operator ==((ExifData_iterator_base const &)*arg2); @@ -5675,7 +5720,7 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_base___eq__(PyObject *self, PyObjec return NULL; } PyErr_Clear(); - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } @@ -5702,7 +5747,7 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_base___ne__(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData_iterator_base___ne__" "', argument " "2"" of type '" "ExifData_iterator_base const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData_iterator_base___ne__" "', argument " "2"" of type '" "ExifData_iterator_base const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData_iterator_base___ne__" "', argument " "2"" of type '" "ExifData_iterator_base const &""'"); } arg2 = reinterpret_cast< ExifData_iterator_base * >(argp2); result = (bool)((ExifData_iterator_base const *)arg1)->operator !=((ExifData_iterator_base const &)*arg2); @@ -5713,7 +5758,7 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_base___ne__(PyObject *self, PyObjec return NULL; } PyErr_Clear(); - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } @@ -5900,7 +5945,7 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_setValue__SWIG_1(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData_iterator_setValue" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData_iterator_setValue" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData_iterator_setValue" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -6038,7 +6083,7 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_setDataArea(PyObject *self, PyObjec } { try { - result = (int)(*arg1)->setDataArea((Exiv2::byte const *)arg2,arg3); + result = (int)(*arg1)->setDataArea((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3)); } catch(std::exception const& e) { _set_python_exception(); @@ -6638,7 +6683,7 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_toString__SWIG_1(PyObject *self, Py arg2 = static_cast< size_t >(val2); { try { - result = (*arg1)->toString(arg2); + result = (*arg1)->toString(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -6716,7 +6761,7 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_toInt64(PyObject *self, PyObject *a } { try { - result = (int64_t)(*arg1)->toInt64(arg2); + result = (int64_t)(*arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -6759,7 +6804,7 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_toFloat(PyObject *self, PyObject *a } { try { - result = (float)(*arg1)->toFloat(arg2); + result = (float)(*arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -6802,7 +6847,7 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_toRational(PyObject *self, PyObject } { try { - result = (*arg1)->toRational(arg2); + result = (*arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -7242,7 +7287,7 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_toUint32(PyObject *self, PyObject * } { try { - result = (uint32_t)(*arg1)->toUint32(arg2); + result = (uint32_t)(*arg1)->toUint32(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -7277,7 +7322,7 @@ SWIGINTERN int _wrap_new_Exifdatum__SWIG_0(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Exifdatum" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Exifdatum" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_Exifdatum" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifKey * >(argp1); res2 = SWIG_ConvertPtr(obj2, &argp2,SWIGTYPE_p_Exiv2__Value, 0 | 0 ); @@ -7316,7 +7361,7 @@ SWIGINTERN int _wrap_new_Exifdatum__SWIG_1(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Exifdatum" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Exifdatum" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_Exifdatum" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifKey * >(argp1); { @@ -7350,7 +7395,7 @@ SWIGINTERN int _wrap_new_Exifdatum__SWIG_2(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Exifdatum" "', argument " "1"" of type '" "Exiv2::Exifdatum const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Exifdatum" "', argument " "1"" of type '" "Exiv2::Exifdatum const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_Exifdatum" "', argument " "1"" of type '" "Exiv2::Exifdatum const &""'"); } arg1 = reinterpret_cast< Exiv2::Exifdatum * >(argp1); { @@ -7503,7 +7548,7 @@ SWIGINTERN PyObject *_wrap_Exifdatum_setValue__SWIG_1(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Exifdatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Exifdatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Exifdatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -7555,7 +7600,7 @@ SWIGINTERN PyObject *_wrap_Exifdatum_setDataArea(PyObject *self, PyObject *args) } { try { - result = (int)((Exiv2::Exifdatum const *)arg1)->setDataArea((Exiv2::byte const *)arg2,arg3); + result = (int)((Exiv2::Exifdatum const *)arg1)->setDataArea((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3)); } catch(std::exception const& e) { _set_python_exception(); @@ -8155,7 +8200,7 @@ SWIGINTERN PyObject *_wrap_Exifdatum_toString__SWIG_1(PyObject *self, PyObject * arg2 = static_cast< size_t >(val2); { try { - result = ((Exiv2::Exifdatum const *)arg1)->toString(arg2); + result = ((Exiv2::Exifdatum const *)arg1)->toString(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -8233,7 +8278,7 @@ SWIGINTERN PyObject *_wrap_Exifdatum_toInt64(PyObject *self, PyObject *args) { } { try { - result = (int64_t)((Exiv2::Exifdatum const *)arg1)->toInt64(arg2); + result = (int64_t)((Exiv2::Exifdatum const *)arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -8276,7 +8321,7 @@ SWIGINTERN PyObject *_wrap_Exifdatum_toFloat(PyObject *self, PyObject *args) { } { try { - result = (float)((Exiv2::Exifdatum const *)arg1)->toFloat(arg2); + result = (float)((Exiv2::Exifdatum const *)arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -8319,7 +8364,7 @@ SWIGINTERN PyObject *_wrap_Exifdatum_toRational(PyObject *self, PyObject *args) } { try { - result = ((Exiv2::Exifdatum const *)arg1)->toRational(arg2); + result = ((Exiv2::Exifdatum const *)arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -8790,7 +8835,7 @@ SWIGINTERN int _wrap_new_ExifThumbC(PyObject *self, PyObject *args, PyObject *kw SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ExifThumbC" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ExifThumbC" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_ExifThumbC" "', argument " "1"" of type '" "Exiv2::ExifData const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); { @@ -8864,7 +8909,7 @@ SWIGINTERN PyObject *_wrap_ExifThumbC_writeFile(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifThumbC_writeFile" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifThumbC_writeFile" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifThumbC_writeFile" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9002,7 +9047,7 @@ SWIGINTERN int _wrap_new_ExifThumb(PyObject *self, PyObject *args, PyObject *kwa SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ExifThumb" "', argument " "1"" of type '" "Exiv2::ExifData &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ExifThumb" "', argument " "1"" of type '" "Exiv2::ExifData &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_ExifThumb" "', argument " "1"" of type '" "Exiv2::ExifData &""'"); } arg1 = reinterpret_cast< Exiv2::ExifData * >(argp1); { @@ -9057,7 +9102,7 @@ SWIGINTERN PyObject *_wrap_ExifThumb_setJpegThumbnail__SWIG_0(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifThumb_setJpegThumbnail" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifThumb_setJpegThumbnail" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifThumb_setJpegThumbnail" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9096,7 +9141,7 @@ SWIGINTERN PyObject *_wrap_ExifThumb_setJpegThumbnail__SWIG_0(PyObject *self, Py { try { #ifdef _EXV_ENABLE_FILESYSTEM - (arg1)->setJpegThumbnail((std::string const &)*arg2,arg3,arg4,arg5); + (arg1)->setJpegThumbnail((std::string const &)*arg2,SWIG_STD_MOVE(arg3),SWIG_STD_MOVE(arg4),arg5); #else throw Exiv2::Error(Exiv2::ErrorCode::kerFunctionNotSupported); #endif @@ -9175,7 +9220,7 @@ SWIGINTERN PyObject *_wrap_ExifThumb_setJpegThumbnail__SWIG_1(PyObject *self, Py arg6 = static_cast< uint16_t >(val6); { try { - (arg1)->setJpegThumbnail((Exiv2::byte const *)arg2,arg3,arg4,arg5,arg6); + (arg1)->setJpegThumbnail((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3),SWIG_STD_MOVE(arg4),SWIG_STD_MOVE(arg5),arg6); } catch(std::exception const& e) { _set_python_exception(); @@ -9217,7 +9262,7 @@ SWIGINTERN PyObject *_wrap_ExifThumb_setJpegThumbnail__SWIG_2(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifThumb_setJpegThumbnail" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifThumb_setJpegThumbnail" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifThumb_setJpegThumbnail" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9281,7 +9326,7 @@ SWIGINTERN PyObject *_wrap_ExifThumb_setJpegThumbnail__SWIG_3(PyObject *self, Py } { try { - (arg1)->setJpegThumbnail((Exiv2::byte const *)arg2,arg3); + (arg1)->setJpegThumbnail((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3)); } catch(std::exception const& e) { _set_python_exception(); @@ -9445,7 +9490,7 @@ SWIGINTERN PyObject *_wrap_ExifData_add__SWIG_0(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData_add" "', argument " "2"" of type '" "Exiv2::ExifKey const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData_add" "', argument " "2"" of type '" "Exiv2::ExifKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData_add" "', argument " "2"" of type '" "Exiv2::ExifKey const &""'"); } arg2 = reinterpret_cast< Exiv2::ExifKey * >(argp2); res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__Value, 0 | 0 ); @@ -9490,7 +9535,7 @@ SWIGINTERN PyObject *_wrap_ExifData_add__SWIG_1(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData_add" "', argument " "2"" of type '" "Exiv2::Exifdatum const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData_add" "', argument " "2"" of type '" "Exiv2::Exifdatum const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData_add" "', argument " "2"" of type '" "Exiv2::Exifdatum const &""'"); } arg2 = reinterpret_cast< Exiv2::Exifdatum * >(argp2); { @@ -9568,13 +9613,13 @@ SWIGINTERN PyObject *_wrap_ExifData_erase__SWIG_0(PyObject *self, PyObject *args ; } if (!argp) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData_erase" "', argument " "2"" of type '" "ExifData_iterator_base""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData_erase" "', argument " "2"" of type '" "ExifData_iterator_base""'"); } arg2 = **argp; } { try { - result = (arg1)->erase(arg2); + result = (arg1)->erase(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -9626,7 +9671,7 @@ SWIGINTERN PyObject *_wrap_ExifData_erase__SWIG_1(PyObject *self, PyObject *args ; } if (!argp) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData_erase" "', argument " "2"" of type '" "ExifData_iterator_base""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData_erase" "', argument " "2"" of type '" "ExifData_iterator_base""'"); } arg2 = **argp; } @@ -9639,13 +9684,13 @@ SWIGINTERN PyObject *_wrap_ExifData_erase__SWIG_1(PyObject *self, PyObject *args ; } if (!argp) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData_erase" "', argument " "3"" of type '" "ExifData_iterator_base""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData_erase" "', argument " "3"" of type '" "ExifData_iterator_base""'"); } arg3 = **argp; } { try { - result = (arg1)->erase(arg2,arg3); + result = (arg1)->erase(SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); } catch(std::exception const& e) { _set_python_exception(); @@ -9870,7 +9915,7 @@ SWIGINTERN PyObject *_wrap_ExifData_findKey(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData_findKey" "', argument " "2"" of type '" "Exiv2::ExifKey const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData_findKey" "', argument " "2"" of type '" "Exiv2::ExifKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData_findKey" "', argument " "2"" of type '" "Exiv2::ExifKey const &""'"); } arg2 = reinterpret_cast< Exiv2::ExifKey * >(argp2); { @@ -9966,7 +10011,7 @@ SWIGINTERN PyObject *_wrap_ExifData___getitem__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData___getitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData___getitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData___getitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -10021,7 +10066,7 @@ SWIGINTERN PyObject *_wrap_ExifData___setitem____SWIG_0(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -10074,7 +10119,7 @@ SWIGINTERN PyObject *_wrap_ExifData___setitem____SWIG_1(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -10085,7 +10130,7 @@ SWIGINTERN PyObject *_wrap_ExifData___setitem____SWIG_1(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ExifData___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -10134,7 +10179,7 @@ SWIGINTERN PyObject *_wrap_ExifData___setitem____SWIG_2(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -10180,7 +10225,7 @@ SWIGINTERN PyObject *_wrap_ExifData___setitem____SWIG_3(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -10285,7 +10330,7 @@ SWIGINTERN PyObject *_wrap_ExifData___contains__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExifData___contains__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifData___contains__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifData___contains__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -10385,7 +10430,7 @@ SwigPyBuiltin__ExifData_iterator_base_richcompare(PyObject *self, PyObject *othe PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); switch (op) { case Py_EQ : result = _wrap_ExifData_iterator_base___eq__(self, tuple); break; case Py_NE : result = _wrap_ExifData_iterator_base___ne__(self, tuple); break; @@ -10396,10 +10441,10 @@ SwigPyBuiltin__ExifData_iterator_base_richcompare(PyObject *self, PyObject *othe result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -10412,42 +10457,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__ExifData_iterator_base_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__ExifData_iterator_base_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.exif.ExifData_iterator_base", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_ExifData_iterator_base_destructor_closure, /* tp_dealloc */ + "exiv2.exif.ExifData_iterator_base", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_ExifData_iterator_base_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__ExifData_iterator_base_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__ExifData_iterator_base_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__ExifData_iterator_base_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - _wrap_ExifData_iterator_base___str___reprfunc_closure, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__ExifData_iterator_base_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__ExifData_iterator_base_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__ExifData_iterator_base_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__ExifData_iterator_base_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + _wrap_ExifData_iterator_base___str___reprfunc_closure, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__ExifData_iterator_base_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -10455,176 +10501,295 @@ static PyHeapTypeObject SwigPyBuiltin__ExifData_iterator_base_type = { "\n" "Python wrapper for an :class:`ExifData` iterator that points to\n" "the 'end' value and can not be dereferenced.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__ExifData_iterator_base_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_ExifData_iterator_base___iter___getiterfunc_closure, /* tp_iter */ - _wrap_ExifData_iterator_base___next___iternextfunc_closure, /* tp_iternext */ - SwigPyBuiltin__ExifData_iterator_base_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__ExifData_iterator_base_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__ExifData_iterator_base_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_ExifData_iterator_base___iter___getiterfunc_closure, /* tp_iter */ + _wrap_ExifData_iterator_base___next___iternextfunc_closure, /* tp_iternext */ + SwigPyBuiltin__ExifData_iterator_base_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__ExifData_iterator_base_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__ExifData_iterator_base_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__ExifData_iterator_base_type}; +static PyTypeObject *SwigPyBuiltin__ExifData_iterator_base_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__ExifData_iterator_base_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifData_iterator_base'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__ExifData_iterator_base_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete_ExifData_iterator_base_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "\n" + "Python wrapper for an :class:`ExifData` iterator that points to\n" + "the 'end' value and can not be dereferenced.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)_wrap_ExifData_iterator_base___str___reprfunc_closure }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__ExifData_iterator_base_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__ExifData_iterator_base_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__ExifData_iterator_base_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)_wrap_ExifData_iterator_base___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)_wrap_ExifData_iterator_base___next___iternextfunc_closure }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.exif.ExifData_iterator_base", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__ExifData_iterator_base_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet ExifData_iterator___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__ExifData_iterator_getset[] = { @@ -10638,7 +10803,7 @@ SwigPyBuiltin__ExifData_iterator_richcompare(PyObject *self, PyObject *other, in PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); switch (op) { case Py_EQ : result = _wrap_ExifData_iterator_base___eq__(self, tuple); break; case Py_NE : result = _wrap_ExifData_iterator_base___ne__(self, tuple); break; @@ -10649,10 +10814,10 @@ SwigPyBuiltin__ExifData_iterator_richcompare(PyObject *self, PyObject *other, in result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -10675,15 +10840,15 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__ExifData_iterator_methods[] = { ":return: Return -1 if the %Exifdatum does not have a value yet or the\n" " value has no data area, else 0.\n" "" }, - { "key", _wrap_ExifData_iterator_key, METH_VARARGS, " Return the key of the %Exifdatum." }, + { "key", _wrap_ExifData_iterator_key, METH_VARARGS, "Return the key of the %Exifdatum." }, { "familyName", _wrap_ExifData_iterator_familyName, METH_VARARGS, "" }, { "groupName", _wrap_ExifData_iterator_groupName, METH_VARARGS, "" }, { "tagName", _wrap_ExifData_iterator_tagName, METH_VARARGS, "" }, { "tagLabel", _wrap_ExifData_iterator_tagLabel, METH_VARARGS, "" }, { "tagDesc", _wrap_ExifData_iterator_tagDesc, METH_VARARGS, "" }, { "tag", _wrap_ExifData_iterator_tag, METH_VARARGS, "" }, - { "ifdName", _wrap_ExifData_iterator_ifdName, METH_VARARGS, " Return the name of the IFD" }, - { "idx", _wrap_ExifData_iterator_idx, METH_VARARGS, " Return the index (unique id of this key within the original IFD)" }, + { "ifdName", _wrap_ExifData_iterator_ifdName, METH_VARARGS, "Return the name of the IFD" }, + { "idx", _wrap_ExifData_iterator_idx, METH_VARARGS, "Return the index (unique id of this key within the original IFD)" }, { "copy", _wrap_ExifData_iterator_copy, METH_VARARGS, "\n" "Write value to a data buffer and return the number\n" " of bytes written.\n" @@ -10699,18 +10864,18 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__ExifData_iterator_methods[] = { ":return: Number of characters written.\n" "" }, { "write", _wrap_ExifData_iterator_write, METH_VARARGS, "" }, - { "typeId", _wrap_ExifData_iterator_typeId, METH_VARARGS, " Return the type id of the value" }, - { "typeName", _wrap_ExifData_iterator_typeName, METH_VARARGS, " Return the name of the type" }, - { "typeSize", _wrap_ExifData_iterator_typeSize, METH_VARARGS, " Return the size in bytes of one component of this type" }, - { "count", _wrap_ExifData_iterator_count, METH_VARARGS, " Return the number of components in the value" }, - { "size", _wrap_ExifData_iterator_size, METH_VARARGS, " Return the size of the value in bytes" }, - { "toString", _wrap_ExifData_iterator_toString, METH_VARARGS, " Return the value as a string." }, + { "typeId", _wrap_ExifData_iterator_typeId, METH_VARARGS, "Return the type id of the value" }, + { "typeName", _wrap_ExifData_iterator_typeName, METH_VARARGS, "Return the name of the type" }, + { "typeSize", _wrap_ExifData_iterator_typeSize, METH_VARARGS, "Return the size in bytes of one component of this type" }, + { "count", _wrap_ExifData_iterator_count, METH_VARARGS, "Return the number of components in the value" }, + { "size", _wrap_ExifData_iterator_size, METH_VARARGS, "Return the size of the value in bytes" }, + { "toString", _wrap_ExifData_iterator_toString, METH_VARARGS, "Return the value as a string." }, { "toInt64", _wrap_ExifData_iterator_toInt64, METH_VARARGS, "" }, { "toFloat", _wrap_ExifData_iterator_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_ExifData_iterator_toRational, METH_VARARGS, "" }, { "getValue", _wrap_ExifData_iterator_getValue, METH_VARARGS, "" }, { "value", _wrap_ExifData_iterator_value, METH_VARARGS, "" }, - { "sizeDataArea", _wrap_ExifData_iterator_sizeDataArea, METH_VARARGS, " Return the size of the data area." }, + { "sizeDataArea", _wrap_ExifData_iterator_sizeDataArea, METH_VARARGS, "Return the size of the data area." }, { "dataArea", _wrap_ExifData_iterator_dataArea, METH_VARARGS, "\n" "Return a copy of the data area of the value. The caller owns\n" " this copy and %DataBuf ensures that it will be deleted.\n" @@ -10730,46 +10895,47 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__ExifData_iterator_methods[] = { "\n" "Implemented in terms of write(), see there.\n" "" }, - { "toUint32", _wrap_ExifData_iterator_toUint32, METH_VARARGS, " Return the **n**-th component of the value converted to uint32_t." }, + { "toUint32", _wrap_ExifData_iterator_toUint32, METH_VARARGS, "Return the **n**-th component of the value converted to uint32_t." }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__ExifData_iterator_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.exif.ExifData_iterator", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_ExifData_iterator_destructor_closure, /* tp_dealloc */ + "exiv2.exif.ExifData_iterator", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_ExifData_iterator_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__ExifData_iterator_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__ExifData_iterator_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__ExifData_iterator_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__ExifData_iterator_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__ExifData_iterator_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__ExifData_iterator_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__ExifData_iterator_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__ExifData_iterator_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -10778,176 +10944,296 @@ static PyHeapTypeObject SwigPyBuiltin__ExifData_iterator_type = { "Python wrapper for an :class:`ExifData` iterator. It has most of\n" "the methods of :class:`Exifdatum` allowing easy access to the\n" "data it points to.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__ExifData_iterator_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__ExifData_iterator_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ SwigPyBuiltin__ExifData_iterator_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__ExifData_iterator_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + 0, /* tp_members */ + SwigPyBuiltin__ExifData_iterator_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__ExifData_iterator_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__ExifData_iterator_type}; +static PyTypeObject *SwigPyBuiltin__ExifData_iterator_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__ExifData_iterator_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifData_iterator'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__ExifData_iterator_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete_ExifData_iterator_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "\n" + "Python wrapper for an :class:`ExifData` iterator. It has most of\n" + "the methods of :class:`Exifdatum` allowing easy access to the\n" + "data it points to.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__ExifData_iterator_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__ExifData_iterator_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__ExifData_iterator_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.exif.ExifData_iterator", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__ExifData_iterator_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet Exifdatum___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__Exifdatum_getset[] = { @@ -10980,16 +11266,16 @@ SwigPyBuiltin__Exiv2__Exifdatum_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -11011,15 +11297,15 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Exifdatum_methods[] = { ":return: Return -1 if the %Exifdatum does not have a value yet or the\n" " value has no data area, else 0.\n" "" }, - { "key", _wrap_Exifdatum_key, METH_VARARGS, " Return the key of the %Exifdatum." }, + { "key", _wrap_Exifdatum_key, METH_VARARGS, "Return the key of the %Exifdatum." }, { "familyName", _wrap_Exifdatum_familyName, METH_VARARGS, "" }, { "groupName", _wrap_Exifdatum_groupName, METH_VARARGS, "" }, { "tagName", _wrap_Exifdatum_tagName, METH_VARARGS, "" }, { "tagLabel", _wrap_Exifdatum_tagLabel, METH_VARARGS, "" }, { "tagDesc", _wrap_Exifdatum_tagDesc, METH_VARARGS, "" }, { "tag", _wrap_Exifdatum_tag, METH_VARARGS, "" }, - { "ifdName", _wrap_Exifdatum_ifdName, METH_VARARGS, " Return the name of the IFD" }, - { "idx", _wrap_Exifdatum_idx, METH_VARARGS, " Return the index (unique id of this key within the original IFD)" }, + { "ifdName", _wrap_Exifdatum_ifdName, METH_VARARGS, "Return the name of the IFD" }, + { "idx", _wrap_Exifdatum_idx, METH_VARARGS, "Return the index (unique id of this key within the original IFD)" }, { "copy", _wrap_Exifdatum_copy, METH_VARARGS, "\n" "Write value to a data buffer and return the number\n" " of bytes written.\n" @@ -11035,18 +11321,18 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Exifdatum_methods[] = { ":return: Number of characters written.\n" "" }, { "write", _wrap_Exifdatum_write, METH_VARARGS, "" }, - { "typeId", _wrap_Exifdatum_typeId, METH_VARARGS, " Return the type id of the value" }, - { "typeName", _wrap_Exifdatum_typeName, METH_VARARGS, " Return the name of the type" }, - { "typeSize", _wrap_Exifdatum_typeSize, METH_VARARGS, " Return the size in bytes of one component of this type" }, - { "count", _wrap_Exifdatum_count, METH_VARARGS, " Return the number of components in the value" }, - { "size", _wrap_Exifdatum_size, METH_VARARGS, " Return the size of the value in bytes" }, - { "toString", _wrap_Exifdatum_toString, METH_VARARGS, " Return the value as a string." }, + { "typeId", _wrap_Exifdatum_typeId, METH_VARARGS, "Return the type id of the value" }, + { "typeName", _wrap_Exifdatum_typeName, METH_VARARGS, "Return the name of the type" }, + { "typeSize", _wrap_Exifdatum_typeSize, METH_VARARGS, "Return the size in bytes of one component of this type" }, + { "count", _wrap_Exifdatum_count, METH_VARARGS, "Return the number of components in the value" }, + { "size", _wrap_Exifdatum_size, METH_VARARGS, "Return the size of the value in bytes" }, + { "toString", _wrap_Exifdatum_toString, METH_VARARGS, "Return the value as a string." }, { "toInt64", _wrap_Exifdatum_toInt64, METH_VARARGS, "" }, { "toFloat", _wrap_Exifdatum_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_Exifdatum_toRational, METH_VARARGS, "" }, { "getValue", _wrap_Exifdatum_getValue, METH_VARARGS, "" }, { "value", _wrap_Exifdatum_value, METH_VARARGS, "" }, - { "sizeDataArea", _wrap_Exifdatum_sizeDataArea, METH_VARARGS, " Return the size of the data area." }, + { "sizeDataArea", _wrap_Exifdatum_sizeDataArea, METH_VARARGS, "Return the size of the data area." }, { "dataArea", _wrap_Exifdatum_dataArea, METH_VARARGS, "\n" "Return a copy of the data area of the value. The caller owns\n" " this copy and %DataBuf ensures that it will be deleted.\n" @@ -11064,222 +11350,341 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Exifdatum_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__Exifdatum_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.exif.Exifdatum", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_Exifdatum_destructor_closure,/* tp_dealloc */ + "exiv2.exif.Exifdatum", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_Exifdatum_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__Exifdatum_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__Exifdatum_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__Exifdatum_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__Exifdatum_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__Exifdatum_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__Exifdatum_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__Exifdatum_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__Exifdatum_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "An Exif metadatum, consisting of an ExifKey and a Value and\n" " methods to manipulate these.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__Exifdatum_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__Exifdatum_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__Exifdatum_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_Exifdatum, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__Exifdatum_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__Exifdatum_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__Exifdatum_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_Exifdatum, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Exifdatum_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__Exifdatum_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__Exifdatum_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Exifdatum_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Exifdatum'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__Exifdatum_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_Exifdatum }, + { Py_tp_dealloc, (void *)_wrap_delete_Exifdatum_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "An Exif metadatum, consisting of an ExifKey and a Value and\n" + " methods to manipulate these.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__Exifdatum_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__Exifdatum_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__Exifdatum_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.exif.Exifdatum", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Exifdatum_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet ExifThumbC___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ExifThumbC_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Constructor.", &ExifThumbC___dict___getset }, + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"Constructor.", &ExifThumbC___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -11289,16 +11694,16 @@ SwigPyBuiltin__Exiv2__ExifThumbC_richcompare(PyObject *self, PyObject *other, in PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -11330,42 +11735,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ExifThumbC_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ExifThumbC_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.exif.ExifThumbC", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_ExifThumbC_destructor_closure, /* tp_dealloc */ + "exiv2.exif.ExifThumbC", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_ExifThumbC_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ExifThumbC_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__ExifThumbC_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ExifThumbC_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ExifThumbC_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ExifThumbC_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ExifThumbC_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__ExifThumbC_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ExifThumbC_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -11379,180 +11785,305 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__ExifThumbC_type = { " image, depending on its format and the camera make and model. This\n" " class only provides access to the Exif thumbnail as specified in the\n" " Exif standard.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ExifThumbC_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ExifThumbC_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ SwigPyBuiltin__Exiv2__ExifThumbC_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ExifThumbC_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_ExifThumbC, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ExifThumbC_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_ExifThumbC, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ExifThumbC_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifThumbC_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ExifThumbC_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifThumbC_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifThumbC'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ExifThumbC_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_ExifThumbC }, + { Py_tp_dealloc, (void *)_wrap_delete_ExifThumbC_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Access to a Exif %thumbnail image. This class provides higher level\n" + " accessors to the thumbnail image that is optionally embedded in IFD1\n" + " of the Exif data. These methods do not write to the Exif metadata.\n" + " Manipulators are provided in subclass ExifThumb.\n" + "\n" + "Notes: Various other preview and thumbnail images may be contained in an\n" + " image, depending on its format and the camera make and model. This\n" + " class only provides access to the Exif thumbnail as specified in the\n" + " Exif standard.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ExifThumbC_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ExifThumbC_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ExifThumbC_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.exif.ExifThumbC", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ExifThumbC_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet ExifThumb___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ExifThumb_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Constructor.", &ExifThumb___dict___getset }, + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"Constructor.", &ExifThumb___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -11562,16 +12093,16 @@ SwigPyBuiltin__Exiv2__ExifThumb_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -11653,42 +12184,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ExifThumb_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ExifThumb_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.exif.ExifThumb", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_ExifThumb_destructor_closure,/* tp_dealloc */ + "exiv2.exif.ExifThumb", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_ExifThumb_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ExifThumb_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__ExifThumb_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ExifThumb_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ExifThumb_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ExifThumb_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ExifThumb_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__ExifThumb_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ExifThumb_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -11702,176 +12234,301 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__ExifThumb_type = { " image, depending on its format and the camera make and model. This\n" " class only provides access to the Exif thumbnail as specified in the\n" " Exif standard.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ExifThumb_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ExifThumb_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ExifThumb_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_ExifThumb, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ExifThumb_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ExifThumb_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ExifThumb_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_ExifThumb, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ExifThumb_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifThumb_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ExifThumb_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifThumb_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifThumb'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ExifThumb_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_ExifThumb }, + { Py_tp_dealloc, (void *)_wrap_delete_ExifThumb_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Access and modify an Exif %thumbnail image. This class implements\n" + " manipulators to set and erase the thumbnail image that is optionally\n" + " embedded in IFD1 of the Exif data. Accessors are provided by the\n" + " base class, ExifThumbC.\n" + "\n" + "Notes: Various other preview and thumbnail images may be contained in an\n" + " image, depending on its format and the camera make and model. This\n" + " class only provides access to the Exif thumbnail as specified in the\n" + " Exif standard.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ExifThumb_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ExifThumb_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ExifThumb_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.exif.ExifThumb", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ExifThumb_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet ExifData___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ExifData_getset[] = { @@ -11902,16 +12559,16 @@ SwigPyBuiltin__Exiv2__ExifData_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -11954,58 +12611,59 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ExifData_methods[] = { "Delete all Exifdatum instances resulting in an empty container.\n" " Note that this also removes thumbnails.\n" "" }, - { "sortByKey", _wrap_ExifData_sortByKey, METH_VARARGS, " Sort metadata by key" }, - { "sortByTag", _wrap_ExifData_sortByTag, METH_VARARGS, " Sort metadata by tag" }, - { "begin", _wrap_ExifData_begin, METH_VARARGS, " Begin of the metadata" }, - { "end", _wrap_ExifData_end, METH_VARARGS, " End of the metadata" }, + { "sortByKey", _wrap_ExifData_sortByKey, METH_VARARGS, "Sort metadata by key" }, + { "sortByTag", _wrap_ExifData_sortByTag, METH_VARARGS, "Sort metadata by tag" }, + { "begin", _wrap_ExifData_begin, METH_VARARGS, "Begin of the metadata" }, + { "end", _wrap_ExifData_end, METH_VARARGS, "End of the metadata" }, { "findKey", _wrap_ExifData_findKey, METH_VARARGS, "\n" "Find the first Exifdatum with the given *key*, return an\n" " iterator to it.\n" "" }, - { "empty", _wrap_ExifData_empty, METH_VARARGS, " Return true if there is no Exif metadata" }, - { "count", _wrap_ExifData_count, METH_VARARGS, " Get the number of metadata entries" }, + { "empty", _wrap_ExifData_empty, METH_VARARGS, "Return true if there is no Exif metadata" }, + { "count", _wrap_ExifData_count, METH_VARARGS, "Get the number of metadata entries" }, { "__getitem__", _wrap_ExifData___getitem__, METH_VARARGS, "" }, { "__setitem__", _wrap_ExifData___setitem__, METH_VARARGS, "" }, { "__contains__", _wrap_ExifData___contains__, METH_VARARGS, "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ExifData_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.exif.ExifData", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ + "exiv2.exif.ExifData", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ _wrap_delete_ExifData_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ExifData_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__ExifData_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ExifData_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ExifData_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ExifData_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ExifData_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__ExifData_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ExifData_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -12020,176 +12678,302 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__ExifData_type = { "- write Exif data to JPEG files\n" "- extract Exif metadata to files, insert from these files\n" "- extract and delete Exif thumbnail (JPEG and TIFF thumbnails)\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ExifData_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ExifData_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ _wrap_ExifData_begin_getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ExifData_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ExifData_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_ExifData, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ExifData_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ExifData_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_ExifData, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - _wrap_ExifData_count_lenfunc_closure, /* mp_length */ - _wrap_ExifData___getitem___binaryfunc_closure, /* mp_subscript */ - _wrap_ExifData___setitem___objobjargproc_closure, /* mp_ass_subscript */ + _wrap_ExifData_count_lenfunc_closure, /* mp_length */ + _wrap_ExifData___getitem___binaryfunc_closure, /* mp_subscript */ + _wrap_ExifData___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - _wrap_ExifData___contains___objobjproc_closure, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + _wrap_ExifData___contains___objobjproc_closure, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ExifData_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifData_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ExifData_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifData_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifData'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ExifData_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_ExifData }, + { Py_tp_dealloc, (void *)_wrap_delete_ExifData_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "A container for Exif data. This is a top-level class of the %Exiv2\n" + " library. The container holds Exifdatum objects.\n" + "\n" + "Provide high-level access to the Exif data of an image:\n" + "- read Exif information from JPEG files\n" + "- access metadata through keys and standard C++ iterators\n" + "- add, modify and delete metadata\n" + "- write Exif data to JPEG files\n" + "- extract Exif metadata to files, insert from these files\n" + "- extract and delete Exif thumbnail (JPEG and TIFF thumbnails)\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ExifData_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ExifData_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ExifData_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)_wrap_ExifData_count_lenfunc_closure }, + { Py_mp_subscript, (void *)_wrap_ExifData___getitem___binaryfunc_closure }, + { Py_mp_ass_subscript, (void *)_wrap_ExifData___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_ExifData_begin_getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)_wrap_ExifData___contains___objobjproc_closure }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.exif.ExifData", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ExifData_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -12795,7 +13579,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -12978,7 +13762,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -13004,31 +13788,27 @@ SWIG_init(void) { /* type '::ExifData_iterator_base' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__ExifData_iterator_base_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifData_iterator_base'."); + builtin_pytype = SwigPyBuiltin__ExifData_iterator_base_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__ExifData_iterator_base_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "ExifData_iterator_base", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "ExifData_iterator_base"); d = md; /* type '::ExifData_iterator' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__ExifData_iterator_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); { PyObject* module = PyImport_ImportModule("enum"); @@ -13040,8 +13820,6 @@ SWIG_init(void) { return NULL; } - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_ExifData_iterator_base"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -13055,27 +13833,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifData_iterator'."); + builtin_pytype = SwigPyBuiltin__ExifData_iterator_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__ExifData_iterator_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "ExifData_iterator", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "ExifData_iterator"); d = md; /* type 'Exiv2::Exifdatum' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Exifdatum_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Metadatum"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -13089,50 +13864,44 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'Exifdatum'."); + builtin_pytype = SwigPyBuiltin__Exiv2__Exifdatum_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__Exifdatum_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "Exifdatum", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "Exifdatum"); d = md; /* type 'Exiv2::ExifThumbC' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifThumbC_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifThumbC'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ExifThumbC_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ExifThumbC_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "ExifThumbC", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "ExifThumbC"); d = md; /* type 'Exiv2::ExifThumb' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifThumb_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__ExifThumbC"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -13146,41 +13915,38 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifThumb'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ExifThumb_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ExifThumb_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "ExifThumb", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "ExifThumb"); d = md; /* type 'Exiv2::ExifData' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifData_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifData'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ExifData_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ExifData_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "ExifData", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "ExifData"); d = md; diff --git a/src/swig-0_28_3/image.py b/src/swig-0_28_3/image.py index f4200d26..0bf1ec2b 100644 --- a/src/swig-0_28_3/image.py +++ b/src/swig-0_28_3/image.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_28_3/image_wrap.cxx b/src/swig-0_28_3/image_wrap.cxx index cb8eb054..9f15faac 100644 --- a/src/swig-0_28_3/image_wrap.cxx +++ b/src/swig-0_28_3/image_wrap.cxx @@ -1,19 +1,20 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_THREADS #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_image" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -148,6 +149,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -201,11 +206,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -824,10 +842,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -846,10 +860,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -870,10 +885,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -903,6 +914,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -944,6 +968,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -965,14 +992,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1002,7 +1029,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1187,7 +1214,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1208,13 +1235,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1224,7 +1251,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1232,11 +1259,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1245,12 +1272,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1374,21 +1401,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1453,7 +1480,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1469,9 +1496,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1504,9 +1531,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1607,7 +1637,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1650,27 +1680,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1694,10 +1724,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1725,7 +1755,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1754,10 +1784,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1784,14 +1814,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1821,7 +1851,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1860,15 +1890,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1912,7 +1945,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1923,7 +1956,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1931,13 +1964,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1950,7 +1983,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1959,7 +1992,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1993,9 +2026,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2016,7 +2049,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2076,9 +2109,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2134,9 +2167,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2166,7 +2202,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2189,7 +2225,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2247,16 +2283,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2270,13 +2309,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2292,9 +2331,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2350,9 +2389,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2399,7 +2441,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2452,7 +2494,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2479,7 +2526,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2489,7 +2536,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2615,7 +2662,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2653,8 +2700,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2714,13 +2761,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2737,24 +2784,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2791,7 +2838,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2855,7 +2902,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2924,11 +2971,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2948,10 +2995,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2971,11 +3018,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2999,15 +3046,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3039,6 +3086,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3065,8 +3113,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3110,7 +3158,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3125,20 +3173,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3211,7 +3259,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3243,11 +3291,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3265,15 +3313,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3423,6 +3471,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3514,6 +3565,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3537,19 +3591,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3559,23 +3613,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3613,7 +3665,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3622,15 +3674,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3645,7 +3697,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3669,10 +3721,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3688,14 +3740,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3721,7 +3773,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3738,7 +3790,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3756,13 +3808,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3778,7 +3830,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3792,7 +3844,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3809,13 +3861,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3831,12 +3883,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3851,7 +3903,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3866,16 +3918,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3902,7 +3954,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -4028,7 +4080,6 @@ static swig_module_info swig_module = {swig_types, 73, 0, 0, 0, 0}; # define SWIG_init init_image #endif -#define SWIG_name "_image" #ifdef __cplusplus #include @@ -4098,7 +4149,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4106,7 +4157,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4114,8 +4165,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4124,7 +4175,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4147,7 +4198,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4161,11 +4212,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4319,7 +4368,7 @@ static void _set_python_exception() { Py_DECREF(args); } - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4625,7 +4674,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -4648,10 +4697,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -4686,12 +4735,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -5114,7 +5159,7 @@ SWIGINTERN PyObject *_wrap_Image_setExifData(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Image_setExifData" "', argument " "2"" of type '" "Exiv2::ExifData const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Image_setExifData" "', argument " "2"" of type '" "Exiv2::ExifData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Image_setExifData" "', argument " "2"" of type '" "Exiv2::ExifData const &""'"); } arg2 = reinterpret_cast< Exiv2::ExifData * >(argp2); { @@ -5183,7 +5228,7 @@ SWIGINTERN PyObject *_wrap_Image_setIptcData(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Image_setIptcData" "', argument " "2"" of type '" "Exiv2::IptcData const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Image_setIptcData" "', argument " "2"" of type '" "Exiv2::IptcData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Image_setIptcData" "', argument " "2"" of type '" "Exiv2::IptcData const &""'"); } arg2 = reinterpret_cast< Exiv2::IptcData * >(argp2); { @@ -5253,7 +5298,7 @@ SWIGINTERN PyObject *_wrap_Image_setXmpPacket(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Image_setXmpPacket" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Image_setXmpPacket" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Image_setXmpPacket" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -5325,7 +5370,7 @@ SWIGINTERN PyObject *_wrap_Image_setXmpData(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Image_setXmpData" "', argument " "2"" of type '" "Exiv2::XmpData const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Image_setXmpData" "', argument " "2"" of type '" "Exiv2::XmpData const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Image_setXmpData" "', argument " "2"" of type '" "Exiv2::XmpData const &""'"); } arg2 = reinterpret_cast< Exiv2::XmpData * >(argp2); { @@ -5395,7 +5440,7 @@ SWIGINTERN PyObject *_wrap_Image_setComment(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Image_setComment" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Image_setComment" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Image_setComment" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -5612,7 +5657,7 @@ SWIGINTERN PyObject *_wrap_Image_setMetadata(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Image_setMetadata" "', argument " "2"" of type '" "Exiv2::Image const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Image_setMetadata" "', argument " "2"" of type '" "Exiv2::Image const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Image_setMetadata" "', argument " "2"" of type '" "Exiv2::Image const &""'"); } arg2 = reinterpret_cast< Exiv2::Image * >(argp2); { @@ -6344,7 +6389,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_createIo__SWIG_0(PyObject *self, Py_ssiz SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageFactory_createIo" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageFactory_createIo" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ImageFactory_createIo" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -6404,7 +6449,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_open__SWIG_0(PyObject *self, Py_ssize_t SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageFactory_open" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageFactory_open" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ImageFactory_open" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -6563,7 +6608,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_create__SWIG_0(PyObject *self, Py_ssize_ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ImageFactory_create" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageFactory_create" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ImageFactory_create" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -6688,7 +6733,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_getType__SWIG_0(PyObject *self, Py_ssize SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageFactory_getType" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageFactory_getType" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ImageFactory_getType" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -6781,7 +6826,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_getType__SWIG_2(PyObject *self, Py_ssize SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ImageFactory_getType" "', argument " "1"" of type '" "Exiv2::BasicIo &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageFactory_getType" "', argument " "1"" of type '" "Exiv2::BasicIo &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ImageFactory_getType" "', argument " "1"" of type '" "Exiv2::BasicIo &""'"); } arg1 = reinterpret_cast< Exiv2::BasicIo * >(argp1); { @@ -6937,7 +6982,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_checkType(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ImageFactory_checkType" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ImageFactory_checkType" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ImageFactory_checkType" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); } arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); @@ -7133,7 +7178,7 @@ SwigPyBuiltin__Exiv2__Image_richcompare(PyObject *self, PyObject *other, int op) result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -7235,7 +7280,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Image_methods[] = { "In order to write directly from the raw XMP packet, use\n" "writeXmpFromPacket(true) or setXmpPacket().\n" "" }, - { "setComment", _wrap_Image_setComment, METH_O, " Set the image comment. The comment is written to the image when writeMetadata() is called." }, + { "setComment", _wrap_Image_setComment, METH_O, "Set the image comment. The comment is written to the image when writeMetadata() is called." }, { "clearComment", _wrap_Image_clearComment, METH_NOARGS, "\n" "Erase any buffered comment. Comment is not removed\n" " from the actual image until the writeMetadata() method is called.\n" @@ -7252,8 +7297,8 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Image_methods[] = { "Erase iccProfile. the profile is not removed from\n" " the actual image until the writeMetadata() method is called.\n" "" }, - { "iccProfileDefined", _wrap_Image_iccProfileDefined, METH_NOARGS, " Returns the status of the ICC profile in the image instance" }, - { "iccProfile", _wrap_Image_iccProfile, METH_NOARGS, " return iccProfile" }, + { "iccProfileDefined", _wrap_Image_iccProfileDefined, METH_NOARGS, "Returns the status of the ICC profile in the image instance" }, + { "iccProfile", _wrap_Image_iccProfile, METH_NOARGS, "return iccProfile" }, { "setMetadata", _wrap_Image_setMetadata, METH_O, "\n" "Copy all existing metadata from source Image. The data is\n" " copied into internal buffers and is not written to the image\n" @@ -7301,7 +7346,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Image_methods[] = { ":rtype: :py:class:`XmpData`\n" ":return: modifiable XmpData instance containing XMP values\n" "" }, - { "xmpPacket", _wrap_Image_xmpPacket, METH_NOARGS, " Return a modifiable reference to the raw XMP packet." }, + { "xmpPacket", _wrap_Image_xmpPacket, METH_NOARGS, "Return a modifiable reference to the raw XMP packet." }, { "writeXmpFromPacket", _wrap_Image_writeXmpFromPacket, METH_VARARGS, "\n" "*Overload 1:*\n" "\n" @@ -7351,9 +7396,9 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Image_methods[] = { "and thus they all have MIME type \"image/tiff\", although a more\n" "specific MIME type may exist (e.g., \"image/x-nikon-nef\").\n" "" }, - { "pixelWidth", _wrap_Image_pixelWidth, METH_NOARGS, " Return the pixel width of the image." }, - { "pixelHeight", _wrap_Image_pixelHeight, METH_NOARGS, " Return the pixel height of the image." }, - { "comment", _wrap_Image_comment, METH_NOARGS, " Return a copy of the image comment. May be an empty string." }, + { "pixelWidth", _wrap_Image_pixelWidth, METH_NOARGS, "Return the pixel width of the image." }, + { "pixelHeight", _wrap_Image_pixelHeight, METH_NOARGS, "Return the pixel height of the image." }, + { "comment", _wrap_Image_comment, METH_NOARGS, "Return a copy of the image comment. May be an empty string." }, { "io", _wrap_Image_io, METH_NOARGS, "\n" "Return a reference to the BasicIo instance being used for Io.\n" "\n" @@ -7381,47 +7426,48 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Image_methods[] = { "Check if image supports a particular type of metadata.\n" " This method is deprecated. Use checkMode() instead.\n" "" }, - { "setTypeSupported", _wrap_Image_setTypeSupported, METH_VARARGS, " set type support for this image format" }, - { "imageType", _wrap_Image_imageType, METH_NOARGS, " set type support for this image format" }, + { "setTypeSupported", _wrap_Image_setTypeSupported, METH_VARARGS, "set type support for this image format" }, + { "imageType", _wrap_Image_imageType, METH_NOARGS, "set type support for this image format" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__Image_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.image.Image", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_Image_destructor_closure, /* tp_dealloc */ + "exiv2.image.Image", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_Image_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__Image_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__Image_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__Image_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__Image_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__Image_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__Image_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__Image_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__Image_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -7435,176 +7481,301 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__Image_type = { "Most client apps will obtain an Image instance by calling a static\n" "ImageFactory method. The Image class can then be used to to read, write,\n" "and save metadata.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__Image_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__Image_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__Image_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__Image_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__Image_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__Image_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Image_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__Image_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__Image_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Image_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Image'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__Image_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete_Image_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Abstract base class defining the interface for an image. This is\n" + " the top-level interface to the Exiv2 library.\n" + "\n" + "Image has containers to store image metadata and subclasses implement\n" + "read and save metadata from and to specific image formats.\n" + "\n" + "Most client apps will obtain an Image instance by calling a static\n" + "ImageFactory method. The Image class can then be used to to read, write,\n" + "and save metadata.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__Image_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__Image_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__Image_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.image.Image", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Image_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet ImageFactory___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ImageFactory_getset[] = { @@ -7654,7 +7825,7 @@ SwigPyBuiltin__Exiv2__ImageFactory_richcompare(PyObject *self, PyObject *other, result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -7830,42 +8001,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ImageFactory_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ImageFactory_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.image.ImageFactory", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_ImageFactory_destructor_closure, /* tp_dealloc */ + "exiv2.image.ImageFactory", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_ImageFactory_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ImageFactory_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__ImageFactory_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ImageFactory_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ImageFactory_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ImageFactory_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ImageFactory_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__ImageFactory_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ImageFactory_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -7873,176 +8045,295 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__ImageFactory_type = { "Returns an Image instance of the specified type.\n" "\n" "The factory is implemented as a static class.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ImageFactory_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ImageFactory_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ImageFactory_getset,/* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_ImageFactory, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ImageFactory_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ImageFactory_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ImageFactory_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_ImageFactory, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ImageFactory_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ImageFactory_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ImageFactory_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ImageFactory_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ImageFactory'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ImageFactory_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_ImageFactory }, + { Py_tp_dealloc, (void *)_wrap_delete_ImageFactory_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Returns an Image instance of the specified type.\n" + "\n" + "The factory is implemented as a static class.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ImageFactory_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ImageFactory_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ImageFactory_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.image.ImageFactory", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ImageFactory_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -8723,7 +9014,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -8906,7 +9197,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -8953,47 +9244,41 @@ SWIG_init(void) { "xmp",Exiv2::ImageType::xmp, NULL))); /* type 'Exiv2::Image' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Image_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'Image'."); + builtin_pytype = SwigPyBuiltin__Exiv2__Image_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__Image_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "Image", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "Image"); d = md; /* type 'Exiv2::ImageFactory' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ImageFactory_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'ImageFactory'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ImageFactory_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ImageFactory_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "ImageFactory", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "ImageFactory"); d = md; diff --git a/src/swig-0_28_3/iptc.py b/src/swig-0_28_3/iptc.py index b822c492..3e853a33 100644 --- a/src/swig-0_28_3/iptc.py +++ b/src/swig-0_28_3/iptc.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_28_3/iptc_wrap.cxx b/src/swig-0_28_3/iptc_wrap.cxx index 015f806f..9c68a799 100644 --- a/src/swig-0_28_3/iptc_wrap.cxx +++ b/src/swig-0_28_3/iptc_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_iptc" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -4010,7 +4062,6 @@ static swig_module_info swig_module = {swig_types, 56, 0, 0, 0, 0}; # define SWIG_init init_iptc #endif -#define SWIG_name "_iptc" #ifdef __cplusplus #include @@ -4080,7 +4131,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4088,7 +4139,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4096,8 +4147,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4106,7 +4157,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4129,7 +4180,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4143,11 +4194,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4304,7 +4353,7 @@ static void _set_python_exception() { Py_DECREF(args); } - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4431,7 +4480,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -4454,10 +4503,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -4492,12 +4541,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -5329,7 +5374,7 @@ SwigPython_std_pair_repr (PyObject *o) PyTuple_SET_ITEM(tuple, 0, PyObject_GetAttrString(o, (char*) "first")); PyTuple_SET_ITEM(tuple, 1, PyObject_GetAttrString(o, (char*) "second")); PyObject *result = PyObject_Repr(tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -5607,7 +5652,7 @@ SWIGINTERN PyObject *_wrap_IptcData_iterator_base___eq__(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData_iterator_base___eq__" "', argument " "2"" of type '" "IptcData_iterator_base const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData_iterator_base___eq__" "', argument " "2"" of type '" "IptcData_iterator_base const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData_iterator_base___eq__" "', argument " "2"" of type '" "IptcData_iterator_base const &""'"); } arg2 = reinterpret_cast< IptcData_iterator_base * >(argp2); result = (bool)((IptcData_iterator_base const *)arg1)->operator ==((IptcData_iterator_base const &)*arg2); @@ -5618,7 +5663,7 @@ SWIGINTERN PyObject *_wrap_IptcData_iterator_base___eq__(PyObject *self, PyObjec return NULL; } PyErr_Clear(); - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } @@ -5645,7 +5690,7 @@ SWIGINTERN PyObject *_wrap_IptcData_iterator_base___ne__(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData_iterator_base___ne__" "', argument " "2"" of type '" "IptcData_iterator_base const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData_iterator_base___ne__" "', argument " "2"" of type '" "IptcData_iterator_base const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData_iterator_base___ne__" "', argument " "2"" of type '" "IptcData_iterator_base const &""'"); } arg2 = reinterpret_cast< IptcData_iterator_base * >(argp2); result = (bool)((IptcData_iterator_base const *)arg1)->operator !=((IptcData_iterator_base const &)*arg2); @@ -5656,7 +5701,7 @@ SWIGINTERN PyObject *_wrap_IptcData_iterator_base___ne__(PyObject *self, PyObjec return NULL; } PyErr_Clear(); - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } @@ -5843,7 +5888,7 @@ SWIGINTERN PyObject *_wrap_IptcData_iterator_setValue__SWIG_1(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData_iterator_setValue" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData_iterator_setValue" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData_iterator_setValue" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -6531,7 +6576,7 @@ SWIGINTERN PyObject *_wrap_IptcData_iterator_toString__SWIG_1(PyObject *self, Py arg2 = static_cast< size_t >(val2); { try { - result = (*arg1)->toString(arg2); + result = (*arg1)->toString(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -6609,7 +6654,7 @@ SWIGINTERN PyObject *_wrap_IptcData_iterator_toInt64(PyObject *self, PyObject *a } { try { - result = (int64_t)(*arg1)->toInt64(arg2); + result = (int64_t)(*arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -6652,7 +6697,7 @@ SWIGINTERN PyObject *_wrap_IptcData_iterator_toFloat(PyObject *self, PyObject *a } { try { - result = (float)(*arg1)->toFloat(arg2); + result = (float)(*arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -6695,7 +6740,7 @@ SWIGINTERN PyObject *_wrap_IptcData_iterator_toRational(PyObject *self, PyObject } { try { - result = (*arg1)->toRational(arg2); + result = (*arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -7074,7 +7119,7 @@ SWIGINTERN PyObject *_wrap_IptcData_iterator_toUint32(PyObject *self, PyObject * } { try { - result = (uint32_t)(*arg1)->toUint32(arg2); + result = (uint32_t)(*arg1)->toUint32(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -7109,7 +7154,7 @@ SWIGINTERN int _wrap_new_Iptcdatum__SWIG_0(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Iptcdatum" "', argument " "1"" of type '" "Exiv2::IptcKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Iptcdatum" "', argument " "1"" of type '" "Exiv2::IptcKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_Iptcdatum" "', argument " "1"" of type '" "Exiv2::IptcKey const &""'"); } arg1 = reinterpret_cast< Exiv2::IptcKey * >(argp1); res2 = SWIG_ConvertPtr(obj2, &argp2,SWIGTYPE_p_Exiv2__Value, 0 | 0 ); @@ -7148,7 +7193,7 @@ SWIGINTERN int _wrap_new_Iptcdatum__SWIG_1(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Iptcdatum" "', argument " "1"" of type '" "Exiv2::IptcKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Iptcdatum" "', argument " "1"" of type '" "Exiv2::IptcKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_Iptcdatum" "', argument " "1"" of type '" "Exiv2::IptcKey const &""'"); } arg1 = reinterpret_cast< Exiv2::IptcKey * >(argp1); { @@ -7182,7 +7227,7 @@ SWIGINTERN int _wrap_new_Iptcdatum__SWIG_2(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Iptcdatum" "', argument " "1"" of type '" "Exiv2::Iptcdatum const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Iptcdatum" "', argument " "1"" of type '" "Exiv2::Iptcdatum const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_Iptcdatum" "', argument " "1"" of type '" "Exiv2::Iptcdatum const &""'"); } arg1 = reinterpret_cast< Exiv2::Iptcdatum * >(argp1); { @@ -7335,7 +7380,7 @@ SWIGINTERN PyObject *_wrap_Iptcdatum_setValue__SWIG_1(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Iptcdatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Iptcdatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Iptcdatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -7937,7 +7982,7 @@ SWIGINTERN PyObject *_wrap_Iptcdatum_toString__SWIG_1(PyObject *self, PyObject * arg2 = static_cast< size_t >(val2); { try { - result = ((Exiv2::Iptcdatum const *)arg1)->toString(arg2); + result = ((Exiv2::Iptcdatum const *)arg1)->toString(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -8015,7 +8060,7 @@ SWIGINTERN PyObject *_wrap_Iptcdatum_toInt64(PyObject *self, PyObject *args) { } { try { - result = (int64_t)((Exiv2::Iptcdatum const *)arg1)->toInt64(arg2); + result = (int64_t)((Exiv2::Iptcdatum const *)arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -8058,7 +8103,7 @@ SWIGINTERN PyObject *_wrap_Iptcdatum_toFloat(PyObject *self, PyObject *args) { } { try { - result = (float)((Exiv2::Iptcdatum const *)arg1)->toFloat(arg2); + result = (float)((Exiv2::Iptcdatum const *)arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -8101,7 +8146,7 @@ SWIGINTERN PyObject *_wrap_Iptcdatum_toRational(PyObject *self, PyObject *args) } { try { - result = ((Exiv2::Iptcdatum const *)arg1)->toRational(arg2); + result = ((Exiv2::Iptcdatum const *)arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -8522,7 +8567,7 @@ SWIGINTERN PyObject *_wrap_IptcData_add__SWIG_0(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData_add" "', argument " "2"" of type '" "Exiv2::IptcKey const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData_add" "', argument " "2"" of type '" "Exiv2::IptcKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData_add" "', argument " "2"" of type '" "Exiv2::IptcKey const &""'"); } arg2 = reinterpret_cast< Exiv2::IptcKey * >(argp2); res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__Value, 0 | 0 ); @@ -8568,7 +8613,7 @@ SWIGINTERN PyObject *_wrap_IptcData_add__SWIG_1(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData_add" "', argument " "2"" of type '" "Exiv2::Iptcdatum const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData_add" "', argument " "2"" of type '" "Exiv2::Iptcdatum const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData_add" "', argument " "2"" of type '" "Exiv2::Iptcdatum const &""'"); } arg2 = reinterpret_cast< Exiv2::Iptcdatum * >(argp2); { @@ -8646,13 +8691,13 @@ SWIGINTERN PyObject *_wrap_IptcData_erase(PyObject *self, PyObject *args) { ; } if (!argp) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData_erase" "', argument " "2"" of type '" "IptcData_iterator_base""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData_erase" "', argument " "2"" of type '" "IptcData_iterator_base""'"); } arg2 = **argp; } { try { - result = (arg1)->erase(arg2); + result = (arg1)->erase(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -8842,7 +8887,7 @@ SWIGINTERN PyObject *_wrap_IptcData_findKey(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData_findKey" "', argument " "2"" of type '" "Exiv2::IptcKey const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData_findKey" "', argument " "2"" of type '" "Exiv2::IptcKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData_findKey" "', argument " "2"" of type '" "Exiv2::IptcKey const &""'"); } arg2 = reinterpret_cast< Exiv2::IptcKey * >(argp2); { @@ -9140,7 +9185,7 @@ SWIGINTERN PyObject *_wrap_IptcData___getitem__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData___getitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData___getitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData___getitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9195,7 +9240,7 @@ SWIGINTERN PyObject *_wrap_IptcData___setitem____SWIG_0(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9248,7 +9293,7 @@ SWIGINTERN PyObject *_wrap_IptcData___setitem____SWIG_1(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9259,7 +9304,7 @@ SWIGINTERN PyObject *_wrap_IptcData___setitem____SWIG_1(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IptcData___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -9308,7 +9353,7 @@ SWIGINTERN PyObject *_wrap_IptcData___setitem____SWIG_2(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9354,7 +9399,7 @@ SWIGINTERN PyObject *_wrap_IptcData___setitem____SWIG_3(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9459,7 +9504,7 @@ SWIGINTERN PyObject *_wrap_IptcData___contains__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IptcData___contains__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IptcData___contains__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "IptcData___contains__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9559,7 +9604,7 @@ SwigPyBuiltin__IptcData_iterator_base_richcompare(PyObject *self, PyObject *othe PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); switch (op) { case Py_EQ : result = _wrap_IptcData_iterator_base___eq__(self, tuple); break; case Py_NE : result = _wrap_IptcData_iterator_base___ne__(self, tuple); break; @@ -9570,10 +9615,10 @@ SwigPyBuiltin__IptcData_iterator_base_richcompare(PyObject *self, PyObject *othe result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -9586,42 +9631,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__IptcData_iterator_base_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__IptcData_iterator_base_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.iptc.IptcData_iterator_base", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_IptcData_iterator_base_destructor_closure, /* tp_dealloc */ + "exiv2.iptc.IptcData_iterator_base", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_IptcData_iterator_base_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__IptcData_iterator_base_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__IptcData_iterator_base_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__IptcData_iterator_base_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - _wrap_IptcData_iterator_base___str___reprfunc_closure, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__IptcData_iterator_base_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__IptcData_iterator_base_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__IptcData_iterator_base_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__IptcData_iterator_base_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + _wrap_IptcData_iterator_base___str___reprfunc_closure, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__IptcData_iterator_base_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -9629,176 +9675,295 @@ static PyHeapTypeObject SwigPyBuiltin__IptcData_iterator_base_type = { "\n" "Python wrapper for an :class:`IptcData` iterator that points to\n" "the 'end' value and can not be dereferenced.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__IptcData_iterator_base_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_IptcData_iterator_base___iter___getiterfunc_closure, /* tp_iter */ - _wrap_IptcData_iterator_base___next___iternextfunc_closure, /* tp_iternext */ - SwigPyBuiltin__IptcData_iterator_base_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__IptcData_iterator_base_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__IptcData_iterator_base_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_IptcData_iterator_base___iter___getiterfunc_closure, /* tp_iter */ + _wrap_IptcData_iterator_base___next___iternextfunc_closure, /* tp_iternext */ + SwigPyBuiltin__IptcData_iterator_base_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__IptcData_iterator_base_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__IptcData_iterator_base_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__IptcData_iterator_base_type}; +static PyTypeObject *SwigPyBuiltin__IptcData_iterator_base_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__IptcData_iterator_base_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcData_iterator_base'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__IptcData_iterator_base_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete_IptcData_iterator_base_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "\n" + "Python wrapper for an :class:`IptcData` iterator that points to\n" + "the 'end' value and can not be dereferenced.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)_wrap_IptcData_iterator_base___str___reprfunc_closure }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__IptcData_iterator_base_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__IptcData_iterator_base_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__IptcData_iterator_base_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)_wrap_IptcData_iterator_base___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)_wrap_IptcData_iterator_base___next___iternextfunc_closure }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.iptc.IptcData_iterator_base", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__IptcData_iterator_base_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet IptcData_iterator___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__IptcData_iterator_getset[] = { @@ -9812,7 +9977,7 @@ SwigPyBuiltin__IptcData_iterator_richcompare(PyObject *self, PyObject *other, in PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); switch (op) { case Py_EQ : result = _wrap_IptcData_iterator_base___eq__(self, tuple); break; case Py_NE : result = _wrap_IptcData_iterator_base___ne__(self, tuple); break; @@ -9823,10 +9988,10 @@ SwigPyBuiltin__IptcData_iterator_richcompare(PyObject *self, PyObject *other, in result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -9860,7 +10025,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__IptcData_iterator_methods[] = { "" }, { "tagLabel", _wrap_IptcData_iterator_tagLabel, METH_VARARGS, "" }, { "tagDesc", _wrap_IptcData_iterator_tagDesc, METH_VARARGS, "" }, - { "tag", _wrap_IptcData_iterator_tag, METH_VARARGS, " Return the tag (aka dataset) number" }, + { "tag", _wrap_IptcData_iterator_tag, METH_VARARGS, "Return the tag (aka dataset) number" }, { "typeId", _wrap_IptcData_iterator_typeId, METH_VARARGS, "" }, { "typeName", _wrap_IptcData_iterator_typeName, METH_VARARGS, "" }, { "typeSize", _wrap_IptcData_iterator_typeSize, METH_VARARGS, "" }, @@ -9878,46 +10043,47 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__IptcData_iterator_methods[] = { "\n" "Implemented in terms of write(), see there.\n" "" }, - { "toUint32", _wrap_IptcData_iterator_toUint32, METH_VARARGS, " Return the **n**-th component of the value converted to uint32_t." }, + { "toUint32", _wrap_IptcData_iterator_toUint32, METH_VARARGS, "Return the **n**-th component of the value converted to uint32_t." }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__IptcData_iterator_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.iptc.IptcData_iterator", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_IptcData_iterator_destructor_closure, /* tp_dealloc */ + "exiv2.iptc.IptcData_iterator", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_IptcData_iterator_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__IptcData_iterator_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__IptcData_iterator_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__IptcData_iterator_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__IptcData_iterator_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__IptcData_iterator_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__IptcData_iterator_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__IptcData_iterator_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__IptcData_iterator_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -9926,176 +10092,296 @@ static PyHeapTypeObject SwigPyBuiltin__IptcData_iterator_type = { "Python wrapper for an :class:`IptcData` iterator. It has most of\n" "the methods of :class:`Iptcdatum` allowing easy access to the\n" "data it points to.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__IptcData_iterator_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__IptcData_iterator_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ SwigPyBuiltin__IptcData_iterator_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__IptcData_iterator_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + 0, /* tp_members */ + SwigPyBuiltin__IptcData_iterator_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__IptcData_iterator_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__IptcData_iterator_type}; +static PyTypeObject *SwigPyBuiltin__IptcData_iterator_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__IptcData_iterator_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcData_iterator'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__IptcData_iterator_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete_IptcData_iterator_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "\n" + "Python wrapper for an :class:`IptcData` iterator. It has most of\n" + "the methods of :class:`Iptcdatum` allowing easy access to the\n" + "data it points to.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__IptcData_iterator_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__IptcData_iterator_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__IptcData_iterator_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.iptc.IptcData_iterator", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__IptcData_iterator_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet Iptcdatum___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__Iptcdatum_getset[] = { @@ -10129,16 +10415,16 @@ SwigPyBuiltin__Exiv2__Iptcdatum_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -10171,7 +10457,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Iptcdatum_methods[] = { "" }, { "tagLabel", _wrap_Iptcdatum_tagLabel, METH_VARARGS, "" }, { "tagDesc", _wrap_Iptcdatum_tagDesc, METH_VARARGS, "" }, - { "tag", _wrap_Iptcdatum_tag, METH_VARARGS, " Return the tag (aka dataset) number" }, + { "tag", _wrap_Iptcdatum_tag, METH_VARARGS, "Return the tag (aka dataset) number" }, { "typeId", _wrap_Iptcdatum_typeId, METH_VARARGS, "" }, { "typeName", _wrap_Iptcdatum_typeName, METH_VARARGS, "" }, { "typeSize", _wrap_Iptcdatum_typeSize, METH_VARARGS, "" }, @@ -10187,42 +10473,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Iptcdatum_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__Iptcdatum_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.iptc.Iptcdatum", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_Iptcdatum_destructor_closure,/* tp_dealloc */ + "exiv2.iptc.Iptcdatum", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_Iptcdatum_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__Iptcdatum_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__Iptcdatum_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__Iptcdatum_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__Iptcdatum_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__Iptcdatum_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__Iptcdatum_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__Iptcdatum_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__Iptcdatum_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -10231,176 +10518,296 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__Iptcdatum_type = { " Value and methods to manipulate these.\n" "\n" " This is referred in the standard as a property.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__Iptcdatum_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__Iptcdatum_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__Iptcdatum_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_Iptcdatum, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__Iptcdatum_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__Iptcdatum_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__Iptcdatum_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_Iptcdatum, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Iptcdatum_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__Iptcdatum_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__Iptcdatum_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Iptcdatum_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Iptcdatum'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__Iptcdatum_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_Iptcdatum }, + { Py_tp_dealloc, (void *)_wrap_delete_Iptcdatum_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "An IPTC metadatum (\"dataset\"), consisting of an IptcKey and a\n" + " Value and methods to manipulate these.\n" + "\n" + " This is referred in the standard as a property.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__Iptcdatum_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__Iptcdatum_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__Iptcdatum_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.iptc.Iptcdatum", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Iptcdatum_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet IptcData___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__IptcData_getset[] = { @@ -10435,16 +10842,16 @@ SwigPyBuiltin__Exiv2__IptcData_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -10477,11 +10884,11 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__IptcData_methods[] = { " the metadata, including pos, are potentially invalidated\n" " by this call.\n" "" }, - { "clear", _wrap_IptcData_clear, METH_VARARGS, " Delete all Iptcdatum instances resulting in an empty container." }, - { "sortByKey", _wrap_IptcData_sortByKey, METH_VARARGS, " Sort metadata by key" }, - { "sortByTag", _wrap_IptcData_sortByTag, METH_VARARGS, " Sort metadata by tag (aka dataset)" }, - { "begin", _wrap_IptcData_begin, METH_VARARGS, " Begin of the metadata" }, - { "end", _wrap_IptcData_end, METH_VARARGS, " End of the metadata" }, + { "clear", _wrap_IptcData_clear, METH_VARARGS, "Delete all Iptcdatum instances resulting in an empty container." }, + { "sortByKey", _wrap_IptcData_sortByKey, METH_VARARGS, "Sort metadata by key" }, + { "sortByTag", _wrap_IptcData_sortByTag, METH_VARARGS, "Sort metadata by tag (aka dataset)" }, + { "begin", _wrap_IptcData_begin, METH_VARARGS, "Begin of the metadata" }, + { "end", _wrap_IptcData_end, METH_VARARGS, "End of the metadata" }, { "findKey", _wrap_IptcData_findKey, METH_VARARGS, "\n" "Find the first Iptcdatum with the given key, return an iterator\n" " to it.\n" @@ -10490,52 +10897,53 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__IptcData_methods[] = { "Find the first Iptcdatum with the given record and dataset it,\n" " return a const iterator to it.\n" "" }, - { "empty", _wrap_IptcData_empty, METH_VARARGS, " Return true if there is no IPTC metadata" }, - { "count", _wrap_IptcData_count, METH_VARARGS, " Get the number of metadata entries" }, - { "size", _wrap_IptcData_size, METH_VARARGS, " Return the exact size of all contained IPTC metadata" }, - { "detectCharset", _wrap_IptcData_detectCharset, METH_VARARGS, " Return the metadata charset name or 0" }, + { "empty", _wrap_IptcData_empty, METH_VARARGS, "Return true if there is no IPTC metadata" }, + { "count", _wrap_IptcData_count, METH_VARARGS, "Get the number of metadata entries" }, + { "size", _wrap_IptcData_size, METH_VARARGS, "Return the exact size of all contained IPTC metadata" }, + { "detectCharset", _wrap_IptcData_detectCharset, METH_VARARGS, "Return the metadata charset name or 0" }, { "__getitem__", _wrap_IptcData___getitem__, METH_VARARGS, "" }, { "__setitem__", _wrap_IptcData___setitem__, METH_VARARGS, "" }, { "__contains__", _wrap_IptcData___contains__, METH_VARARGS, "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__IptcData_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.iptc.IptcData", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ + "exiv2.iptc.IptcData", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ _wrap_delete_IptcData_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__IptcData_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__IptcData_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__IptcData_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__IptcData_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__IptcData_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__IptcData_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__IptcData_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__IptcData_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -10548,176 +10956,300 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__IptcData_type = { "- add, modify and delete metadata\n" "- write IPTC data to JPEG files\n" "- extract IPTC metadata to files, insert from these files\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__IptcData_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__IptcData_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ _wrap_IptcData_begin_getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__IptcData_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__IptcData_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_IptcData, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__IptcData_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__IptcData_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_IptcData, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - _wrap_IptcData_count_lenfunc_closure, /* mp_length */ - _wrap_IptcData___getitem___binaryfunc_closure, /* mp_subscript */ - _wrap_IptcData___setitem___objobjargproc_closure, /* mp_ass_subscript */ + _wrap_IptcData_count_lenfunc_closure, /* mp_length */ + _wrap_IptcData___getitem___binaryfunc_closure, /* mp_subscript */ + _wrap_IptcData___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - _wrap_IptcData___contains___objobjproc_closure, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + _wrap_IptcData___contains___objobjproc_closure, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__IptcData_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__IptcData_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__IptcData_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__IptcData_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcData'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__IptcData_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_IptcData }, + { Py_tp_dealloc, (void *)_wrap_delete_IptcData_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "A container for IPTC data. This is a top-level class of the %Exiv2 library.\n" + "\n" + "Provide high-level access to the IPTC data of an image:\n" + "- read IPTC information from JPEG files\n" + "- access metadata through keys and standard C++ iterators\n" + "- add, modify and delete metadata\n" + "- write IPTC data to JPEG files\n" + "- extract IPTC metadata to files, insert from these files\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__IptcData_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__IptcData_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__IptcData_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)_wrap_IptcData_count_lenfunc_closure }, + { Py_mp_subscript, (void *)_wrap_IptcData___getitem___binaryfunc_closure }, + { Py_mp_ass_subscript, (void *)_wrap_IptcData___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_IptcData_begin_getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)_wrap_IptcData___contains___objobjproc_closure }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.iptc.IptcData", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__IptcData_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -11312,7 +11844,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -11495,7 +12027,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -11521,31 +12053,27 @@ SWIG_init(void) { /* type '::IptcData_iterator_base' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__IptcData_iterator_base_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcData_iterator_base'."); + builtin_pytype = SwigPyBuiltin__IptcData_iterator_base_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__IptcData_iterator_base_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "IptcData_iterator_base", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "IptcData_iterator_base"); d = md; /* type '::IptcData_iterator' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__IptcData_iterator_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); { PyObject* module = PyImport_ImportModule("enum"); @@ -11557,8 +12085,6 @@ SWIG_init(void) { return NULL; } - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_IptcData_iterator_base"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -11572,27 +12098,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcData_iterator'."); + builtin_pytype = SwigPyBuiltin__IptcData_iterator_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__IptcData_iterator_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "IptcData_iterator", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "IptcData_iterator"); d = md; /* type 'Exiv2::Iptcdatum' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Iptcdatum_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Metadatum"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -11606,41 +12129,38 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'Iptcdatum'."); + builtin_pytype = SwigPyBuiltin__Exiv2__Iptcdatum_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__Iptcdatum_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "Iptcdatum", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "Iptcdatum"); d = md; /* type 'Exiv2::IptcData' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__IptcData_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcData'."); + builtin_pytype = SwigPyBuiltin__Exiv2__IptcData_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__IptcData_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "IptcData", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "IptcData"); d = md; diff --git a/src/swig-0_28_3/metadatum.py b/src/swig-0_28_3/metadatum.py index cdf38338..e3e53e6d 100644 --- a/src/swig-0_28_3/metadatum.py +++ b/src/swig-0_28_3/metadatum.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_28_3/metadatum_wrap.cxx b/src/swig-0_28_3/metadatum_wrap.cxx index 22d2124c..3a47cc01 100644 --- a/src/swig-0_28_3/metadatum_wrap.cxx +++ b/src/swig-0_28_3/metadatum_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_metadatum" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -4002,7 +4054,6 @@ static swig_module_info swig_module = {swig_types, 48, 0, 0, 0, 0}; # define SWIG_init init_metadatum #endif -#define SWIG_name "_metadatum" #ifdef __cplusplus #include @@ -4072,7 +4123,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4080,7 +4131,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4088,8 +4139,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4098,7 +4149,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4121,7 +4172,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4135,11 +4186,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4290,7 +4339,7 @@ static void _set_python_exception() { Py_DECREF(args); } - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4377,7 +4426,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -4400,10 +4449,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -4438,12 +4487,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -5267,7 +5312,7 @@ SwigPython_std_pair_repr (PyObject *o) PyTuple_SET_ITEM(tuple, 0, PyObject_GetAttrString(o, (char*) "first")); PyTuple_SET_ITEM(tuple, 1, PyObject_GetAttrString(o, (char*) "second")); PyObject *result = PyObject_Repr(tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -5699,7 +5744,7 @@ SWIGINTERN PyObject *_wrap_Metadatum_setValue__SWIG_1(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Metadatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Metadatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Metadatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -6344,7 +6389,7 @@ SWIGINTERN PyObject *_wrap_Metadatum_toString__SWIG_1(PyObject *self, PyObject * arg2 = static_cast< size_t >(val2); { try { - result = ((Exiv2::Metadatum const *)arg1)->toString(arg2); + result = ((Exiv2::Metadatum const *)arg1)->toString(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -6422,7 +6467,7 @@ SWIGINTERN PyObject *_wrap_Metadatum_toInt64(PyObject *self, PyObject *args) { } { try { - result = (int64_t)((Exiv2::Metadatum const *)arg1)->toInt64(arg2); + result = (int64_t)((Exiv2::Metadatum const *)arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -6465,7 +6510,7 @@ SWIGINTERN PyObject *_wrap_Metadatum_toUint32(PyObject *self, PyObject *args) { } { try { - result = (uint32_t)((Exiv2::Metadatum const *)arg1)->toUint32(arg2); + result = (uint32_t)((Exiv2::Metadatum const *)arg1)->toUint32(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -6508,7 +6553,7 @@ SWIGINTERN PyObject *_wrap_Metadatum_toFloat(PyObject *self, PyObject *args) { } { try { - result = (float)((Exiv2::Metadatum const *)arg1)->toFloat(arg2); + result = (float)((Exiv2::Metadatum const *)arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -6551,7 +6596,7 @@ SWIGINTERN PyObject *_wrap_Metadatum_toRational(PyObject *self, PyObject *args) } { try { - result = ((Exiv2::Metadatum const *)arg1)->toRational(arg2); + result = ((Exiv2::Metadatum const *)arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -6686,16 +6731,16 @@ SwigPyBuiltin__Exiv2__Key_richcompare(PyObject *self, PyObject *other, int op) { PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -6706,12 +6751,12 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Key_methods[] = { " key is not necessarily unique, e.g., an ExifData may contain\n" " multiple metadata with the same key.\n" "" }, - { "familyName", _wrap_Key_familyName, METH_VARARGS, " Return an identifier for the type of metadata (the first part of the key)" }, - { "groupName", _wrap_Key_groupName, METH_VARARGS, " Return the name of the group (the second part of the key)" }, - { "tagName", _wrap_Key_tagName, METH_VARARGS, " Return the name of the tag (which is also the third part of the key)" }, - { "tagLabel", _wrap_Key_tagLabel, METH_VARARGS, " Return a label for the tag" }, - { "tagDesc", _wrap_Key_tagDesc, METH_VARARGS, " Return a description for the tag" }, - { "tag", _wrap_Key_tag, METH_VARARGS, " Return the tag number" }, + { "familyName", _wrap_Key_familyName, METH_VARARGS, "Return an identifier for the type of metadata (the first part of the key)" }, + { "groupName", _wrap_Key_groupName, METH_VARARGS, "Return the name of the group (the second part of the key)" }, + { "tagName", _wrap_Key_tagName, METH_VARARGS, "Return the name of the tag (which is also the third part of the key)" }, + { "tagLabel", _wrap_Key_tagLabel, METH_VARARGS, "Return a label for the tag" }, + { "tagDesc", _wrap_Key_tagDesc, METH_VARARGS, "Return a description for the tag" }, + { "tag", _wrap_Key_tag, METH_VARARGS, "Return the tag number" }, { "clone", _wrap_Key_clone, METH_VARARGS, "\n" "Return an auto-pointer to a copy of itself (deep copy).\n" " The caller owns this copy and the auto-pointer ensures that it\n" @@ -6726,218 +6771,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Key_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__Key_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.metadatum.Key", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.metadatum.Key", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__Key_type.as_number,/* tp_as_number */ - &SwigPyBuiltin__Exiv2__Key_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__Key_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - _wrap_Key_key_reprfunc_closure, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__Key_type.as_buffer,/* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__Key_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__Key_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__Key_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + _wrap_Key_key_reprfunc_closure, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__Key_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Abstract base class defining the %Key of a metadatum.\n" " Keys are used to identify and group metadata.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__Key_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__Key_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__Key_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__Key_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__Key_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__Key_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Key_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__Key_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__Key_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Key_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Key'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__Key_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Abstract base class defining the %Key of a metadatum.\n" + " Keys are used to identify and group metadata.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)_wrap_Key_key_reprfunc_closure }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__Key_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__Key_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__Key_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.metadatum.Key", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Key_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet Metadatum___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__Metadatum_getset[] = { @@ -6965,16 +7129,16 @@ SwigPyBuiltin__Exiv2__Metadatum_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -7040,17 +7204,17 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Metadatum_methods[] = { " is not necessarily unique, e.g., an ExifData object may\n" " contain multiple metadata with the same key.\n" "" }, - { "familyName", _wrap_Metadatum_familyName, METH_VARARGS, " Return the name of the metadata family (which is also the first part of the key)" }, - { "groupName", _wrap_Metadatum_groupName, METH_VARARGS, " Return the name of the metadata group (which is also the second part of the key)" }, - { "tagName", _wrap_Metadatum_tagName, METH_VARARGS, " Return the name of the tag (which is also the third part of the key)" }, - { "tagLabel", _wrap_Metadatum_tagLabel, METH_VARARGS, " Return a label for the tag" }, - { "tagDesc", _wrap_Metadatum_tagDesc, METH_VARARGS, " Return a description for the tag" }, - { "tag", _wrap_Metadatum_tag, METH_VARARGS, " Return the tag" }, - { "typeId", _wrap_Metadatum_typeId, METH_VARARGS, " Return the type id of the value" }, - { "typeName", _wrap_Metadatum_typeName, METH_VARARGS, " Return the name of the type" }, - { "typeSize", _wrap_Metadatum_typeSize, METH_VARARGS, " Return the size in bytes of one component of this type" }, - { "count", _wrap_Metadatum_count, METH_VARARGS, " Return the number of components in the value" }, - { "size", _wrap_Metadatum_size, METH_VARARGS, " Return the size of the value in bytes" }, + { "familyName", _wrap_Metadatum_familyName, METH_VARARGS, "Return the name of the metadata family (which is also the first part of the key)" }, + { "groupName", _wrap_Metadatum_groupName, METH_VARARGS, "Return the name of the metadata group (which is also the second part of the key)" }, + { "tagName", _wrap_Metadatum_tagName, METH_VARARGS, "Return the name of the tag (which is also the third part of the key)" }, + { "tagLabel", _wrap_Metadatum_tagLabel, METH_VARARGS, "Return a label for the tag" }, + { "tagDesc", _wrap_Metadatum_tagDesc, METH_VARARGS, "Return a description for the tag" }, + { "tag", _wrap_Metadatum_tag, METH_VARARGS, "Return the tag" }, + { "typeId", _wrap_Metadatum_typeId, METH_VARARGS, "Return the type id of the value" }, + { "typeName", _wrap_Metadatum_typeName, METH_VARARGS, "Return the name of the type" }, + { "typeSize", _wrap_Metadatum_typeSize, METH_VARARGS, "Return the size in bytes of one component of this type" }, + { "count", _wrap_Metadatum_count, METH_VARARGS, "Return the number of components in the value" }, + { "size", _wrap_Metadatum_size, METH_VARARGS, "Return the size of the value in bytes" }, { "toString", _wrap_Metadatum_toString, METH_VARARGS, "\n" "*Overload 1:*\n" "Return the value as a string.\n" @@ -7068,7 +7232,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Metadatum_methods[] = { " The return value is -1 if the value is not set and the behaviour\n" " of the method is undefined if there is no **n**-th component.\n" "" }, - { "toUint32", _wrap_Metadatum_toUint32, METH_VARARGS, " Return the **n**-th component of the value converted to uint32_t." }, + { "toUint32", _wrap_Metadatum_toUint32, METH_VARARGS, "Return the **n**-th component of the value converted to uint32_t." }, { "toFloat", _wrap_Metadatum_toFloat, METH_VARARGS, "\n" "Return the **n**-th component of the value converted to float.\n" " The return value is -1 if the value is not set and the behaviour\n" @@ -7111,218 +7275,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Metadatum_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__Metadatum_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.metadatum.Metadatum", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.metadatum.Metadatum", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__Metadatum_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__Metadatum_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__Metadatum_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__Metadatum_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__Metadatum_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__Metadatum_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ _wrap_Metadatum___str___reprfunc_closure, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__Metadatum_type.as_buffer, /* tp_as_buffer */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__Metadatum_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Abstract base class defining the interface to access information\n" " related to one metadata tag.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__Metadatum_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__Metadatum_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__Metadatum_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__Metadatum_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__Metadatum_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__Metadatum_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Metadatum_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__Metadatum_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__Metadatum_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Metadatum_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Metadatum'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__Metadatum_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Abstract base class defining the interface to access information\n" + " related to one metadata tag.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)_wrap_Metadatum___str___reprfunc_closure }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__Metadatum_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__Metadatum_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__Metadatum_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.metadatum.Metadatum", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Metadatum_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -7876,7 +8159,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -8059,7 +8342,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -8085,31 +8368,27 @@ SWIG_init(void) { /* type 'Exiv2::Key' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Key_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'Key'."); + builtin_pytype = SwigPyBuiltin__Exiv2__Key_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__Key_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "Key", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "Key"); d = md; /* type 'Exiv2::Metadatum' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Metadatum_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); { PyObject* module = PyImport_ImportModule("enum"); @@ -8121,22 +8400,20 @@ SWIG_init(void) { return NULL; } - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'Metadatum'."); + builtin_pytype = SwigPyBuiltin__Exiv2__Metadatum_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__Metadatum_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "Metadatum", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "Metadatum"); d = md; diff --git a/src/swig-0_28_3/preview.py b/src/swig-0_28_3/preview.py index 7bdcfa96..a1c630e7 100644 --- a/src/swig-0_28_3/preview.py +++ b/src/swig-0_28_3/preview.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_28_3/preview_wrap.cxx b/src/swig-0_28_3/preview_wrap.cxx index d7bc1b4c..b85b10b3 100644 --- a/src/swig-0_28_3/preview_wrap.cxx +++ b/src/swig-0_28_3/preview_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_preview" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -4030,7 +4082,6 @@ static swig_module_info swig_module = {swig_types, 73, 0, 0, 0, 0}; # define SWIG_init init_preview #endif -#define SWIG_name "_preview" #ifdef __cplusplus #include @@ -4100,7 +4151,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4108,7 +4159,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4116,8 +4167,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4126,7 +4177,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4149,7 +4200,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4163,11 +4214,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4338,12 +4387,7 @@ namespace swig { } static swig_type_info* descriptor() { - static int init = 0; - static swig_type_info* desc = 0; - if (!init) { - desc = SWIG_TypeQuery("swig::SwigPyIterator *"); - init = 1; - } + static swig_type_info* desc = SWIG_TypeQuery("swig::SwigPyIterator *"); return desc; } }; @@ -4351,7 +4395,7 @@ namespace swig { #if defined(SWIGPYTHON_BUILTIN) inline PyObject* make_output_iterator_builtin (PyObject *pyself) { - Py_INCREF(pyself); + SWIG_Py_INCREF(pyself); return pyself; } #endif @@ -4474,7 +4518,7 @@ static void _set_python_exception() { Py_DECREF(args); } - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -5147,7 +5191,7 @@ namespace swig { template <> struct traits_from { typedef PyObject * value_type; static PyObject *from(const value_type& val) { - Py_XINCREF(val); + SWIG_Py_XINCREF(val); return val; } }; @@ -5582,7 +5626,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -5605,10 +5649,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -5643,12 +5687,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -6123,7 +6163,7 @@ SWIGINTERN PyObject *_wrap_PreviewProperties___getitem__(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "PreviewProperties___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PreviewProperties___getitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "PreviewProperties___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -6176,7 +6216,7 @@ SWIGINTERN PyObject *_wrap_PreviewProperties___setitem__(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "PreviewProperties___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PreviewProperties___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "PreviewProperties___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -6250,7 +6290,7 @@ SWIGINTERN int _wrap_new_PreviewImage(PyObject *self, PyObject *args, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PreviewImage" "', argument " "1"" of type '" "Exiv2::PreviewImage const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PreviewImage" "', argument " "1"" of type '" "Exiv2::PreviewImage const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_PreviewImage" "', argument " "1"" of type '" "Exiv2::PreviewImage const &""'"); } arg1 = reinterpret_cast< Exiv2::PreviewImage * >(argp1); { @@ -6397,7 +6437,7 @@ SWIGINTERN PyObject *_wrap_PreviewImage_writeFile(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PreviewImage_writeFile" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PreviewImage_writeFile" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "PreviewImage_writeFile" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -6586,7 +6626,7 @@ SWIGINTERN int _wrap_new_PreviewManager(PyObject *self, PyObject *args, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PreviewManager" "', argument " "1"" of type '" "Exiv2::Image const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PreviewManager" "', argument " "1"" of type '" "Exiv2::Image const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_PreviewManager" "', argument " "1"" of type '" "Exiv2::Image const &""'"); } arg1 = reinterpret_cast< Exiv2::Image * >(argp1); { @@ -6663,7 +6703,7 @@ SWIGINTERN PyObject *_wrap_PreviewManager_getPreviewImage(PyObject *self, PyObje SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PreviewManager_getPreviewImage" "', argument " "2"" of type '" "Exiv2::PreviewProperties const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PreviewManager_getPreviewImage" "', argument " "2"" of type '" "Exiv2::PreviewProperties const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "PreviewManager_getPreviewImage" "', argument " "2"" of type '" "Exiv2::PreviewProperties const &""'"); } arg2 = reinterpret_cast< Exiv2::PreviewProperties * >(argp2); { @@ -6724,13 +6764,13 @@ static SwigPyGetSet PreviewProperties_width__getset = { _wrap_PreviewProperties_ static SwigPyGetSet PreviewProperties___dict___getset = { SwigPyObject_get___dict__, 0 }; static SwigPyGetSet PreviewProperties_extension__getset = { _wrap_PreviewProperties_extension__get, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__PreviewProperties_getset[] = { - { (char *)"height_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Preview image height in pixels or 0 for unknown height.", &PreviewProperties_height__getset }, - { (char *)"id_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Identifies type of preview image.", &PreviewProperties_id__getset }, - { (char *)"mimeType_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Preview image mime type.", &PreviewProperties_mimeType__getset }, - { (char *)"size_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Preview image size in bytes.", &PreviewProperties_size__getset }, - { (char *)"width_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Preview image width in pixels or 0 for unknown width.", &PreviewProperties_width__getset }, - { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Preview image mime type.", &PreviewProperties___dict___getset }, - { (char *)"extension_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Preview image extension.", &PreviewProperties_extension__getset }, + { (char *)"height_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Preview image height in pixels or 0 for unknown height.", &PreviewProperties_height__getset }, + { (char *)"id_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Identifies type of preview image.", &PreviewProperties_id__getset }, + { (char *)"mimeType_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Preview image mime type.", &PreviewProperties_mimeType__getset }, + { (char *)"size_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Preview image size in bytes.", &PreviewProperties_size__getset }, + { (char *)"width_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Preview image width in pixels or 0 for unknown width.", &PreviewProperties_width__getset }, + { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Preview image mime type.", &PreviewProperties___dict___getset }, + { (char *)"extension_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Preview image extension.", &PreviewProperties_extension__getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -6742,7 +6782,7 @@ SwigPyBuiltin__Exiv2__PreviewProperties_richcompare(PyObject *self, PyObject *ot result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -6772,219 +6812,335 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__PreviewProperties_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__PreviewProperties_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.preview.PreviewProperties", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_PreviewProperties_destructor_closure, /* tp_dealloc */ + "exiv2.preview.PreviewProperties", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_PreviewProperties_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__PreviewProperties_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__PreviewProperties_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__PreviewProperties_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__PreviewProperties_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__PreviewProperties_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__PreviewProperties_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__PreviewProperties_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__PreviewProperties_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Preview image properties.", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__PreviewProperties_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_PreviewProperties___iter___getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__PreviewProperties_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__PreviewProperties_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Preview image properties.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__PreviewProperties_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_PreviewProperties___iter___getiterfunc_closure, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__PreviewProperties_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__PreviewProperties_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - _wrap_PreviewProperties___getitem__, /* mp_subscript */ - _wrap_PreviewProperties___setitem___objobjargproc_closure, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + _wrap_PreviewProperties___getitem__, /* mp_subscript */ + _wrap_PreviewProperties___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__PreviewProperties_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__PreviewProperties_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__PreviewProperties_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__PreviewProperties_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'PreviewProperties'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__PreviewProperties_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete_PreviewProperties_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Preview image properties." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__PreviewProperties_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__PreviewProperties_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__PreviewProperties_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)_wrap_PreviewProperties___getitem__ }, + { Py_mp_ass_subscript, (void *)_wrap_PreviewProperties___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_PreviewProperties___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.preview.PreviewProperties", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__PreviewProperties_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet PreviewImage___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__PreviewImage_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Copy constructor", &PreviewImage___dict___getset }, + { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Copy constructor", &PreviewImage___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -6996,7 +7152,7 @@ SwigPyBuiltin__Exiv2__PreviewImage_richcompare(PyObject *self, PyObject *other, result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -7014,7 +7170,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__PreviewImage_methods[] = { "\n" ":rtype: memoryview\n" "" }, - { "size", _wrap_PreviewImage_size, METH_NOARGS, " Return the size of the preview image in bytes." }, + { "size", _wrap_PreviewImage_size, METH_NOARGS, "Return the size of the preview image in bytes." }, { "writeFile", _wrap_PreviewImage_writeFile, METH_O, "\n" "Write the thumbnail image to a file.\n" "\n" @@ -7035,226 +7191,342 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__PreviewImage_methods[] = { "Return the file extension for the format of the preview image\n" " (\".tif\" or \".jpg\").\n" "" }, - { "width", _wrap_PreviewImage_width, METH_NOARGS, " Return the width of the preview image in pixels." }, - { "height", _wrap_PreviewImage_height, METH_NOARGS, " Return the height of the preview image in pixels." }, - { "id", _wrap_PreviewImage_id, METH_NOARGS, " Return the preview image type identifier." }, + { "width", _wrap_PreviewImage_width, METH_NOARGS, "Return the width of the preview image in pixels." }, + { "height", _wrap_PreviewImage_height, METH_NOARGS, "Return the height of the preview image in pixels." }, + { "id", _wrap_PreviewImage_id, METH_NOARGS, "Return the preview image type identifier." }, { "__len__", _wrap_PreviewImage___len__, METH_NOARGS, "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__PreviewImage_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.preview.PreviewImage", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_PreviewImage_destructor_closure, /* tp_dealloc */ + "exiv2.preview.PreviewImage", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_PreviewImage_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__PreviewImage_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__PreviewImage_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__PreviewImage_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__PreviewImage_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__PreviewImage_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__PreviewImage_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__PreviewImage_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__PreviewImage_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Class that holds preview image properties and data buffer.",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__PreviewImage_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__PreviewImage_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__PreviewImage_getset,/* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_PreviewImage, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Class that holds preview image properties and data buffer.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__PreviewImage_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__PreviewImage_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__PreviewImage_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_PreviewImage, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_PreviewImage___len___lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + _wrap_PreviewImage___len___lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - getbuffer_Exiv2_PreviewImage, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + getbuffer_Exiv2_PreviewImage, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__PreviewImage_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__PreviewImage_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__PreviewImage_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__PreviewImage_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'PreviewImage'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__PreviewImage_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_PreviewImage }, + { Py_tp_dealloc, (void *)_wrap_delete_PreviewImage_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Class that holds preview image properties and data buffer." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__PreviewImage_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__PreviewImage_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__PreviewImage_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_PreviewImage___len___lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.preview.PreviewImage", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__PreviewImage_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet PreviewManager___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__PreviewManager_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Constructor.", &PreviewManager___dict___getset }, + { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Constructor.", &PreviewManager___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -7266,7 +7538,7 @@ SwigPyBuiltin__Exiv2__PreviewManager_richcompare(PyObject *self, PyObject *other result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -7278,219 +7550,335 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__PreviewManager_methods[] = { " sorted by preview width * height, starting with the smallest\n" " preview image.\n" "" }, - { "getPreviewImage", _wrap_PreviewManager_getPreviewImage, METH_O, " Return the preview image for the given preview properties." }, + { "getPreviewImage", _wrap_PreviewManager_getPreviewImage, METH_O, "Return the preview image for the given preview properties." }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__PreviewManager_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.preview.PreviewManager", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_PreviewManager_destructor_closure, /* tp_dealloc */ + "exiv2.preview.PreviewManager", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_PreviewManager_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__PreviewManager_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__PreviewManager_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__PreviewManager_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__PreviewManager_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__PreviewManager_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__PreviewManager_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__PreviewManager_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__PreviewManager_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Class for extracting preview images from image metadata.", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__PreviewManager_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__PreviewManager_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__PreviewManager_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_PreviewManager, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Class for extracting preview images from image metadata.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__PreviewManager_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__PreviewManager_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__PreviewManager_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_PreviewManager, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__PreviewManager_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__PreviewManager_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__PreviewManager_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__PreviewManager_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'PreviewManager'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__PreviewManager_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_PreviewManager }, + { Py_tp_dealloc, (void *)_wrap_delete_PreviewManager_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Class for extracting preview images from image metadata." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__PreviewManager_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__PreviewManager_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__PreviewManager_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.preview.PreviewManager", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__PreviewManager_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -8171,7 +8559,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -8354,7 +8742,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -8380,70 +8768,61 @@ SWIG_init(void) { /* type 'Exiv2::PreviewProperties' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__PreviewProperties_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'PreviewProperties'."); + builtin_pytype = SwigPyBuiltin__Exiv2__PreviewProperties_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__PreviewProperties_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "PreviewProperties", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "PreviewProperties"); d = md; /* type 'Exiv2::PreviewImage' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__PreviewImage_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'PreviewImage'."); + builtin_pytype = SwigPyBuiltin__Exiv2__PreviewImage_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__PreviewImage_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "PreviewImage", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "PreviewImage"); d = md; /* type 'Exiv2::PreviewManager' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__PreviewManager_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'PreviewManager'."); + builtin_pytype = SwigPyBuiltin__Exiv2__PreviewManager_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__PreviewManager_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "PreviewManager", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "PreviewManager"); d = md; diff --git a/src/swig-0_28_3/properties.py b/src/swig-0_28_3/properties.py index 27fed16a..65aa03d7 100644 --- a/src/swig-0_28_3/properties.py +++ b/src/swig-0_28_3/properties.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_28_3/properties_wrap.cxx b/src/swig-0_28_3/properties_wrap.cxx index 15b0aba2..58aa3a49 100644 --- a/src/swig-0_28_3/properties_wrap.cxx +++ b/src/swig-0_28_3/properties_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_properties" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -4004,7 +4056,6 @@ static swig_module_info swig_module = {swig_types, 50, 0, 0, 0, 0}; # define SWIG_init init_properties #endif -#define SWIG_name "_properties" #ifdef __cplusplus #include @@ -4074,7 +4125,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4082,7 +4133,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4090,8 +4141,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4100,7 +4151,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4123,7 +4174,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4137,11 +4188,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4292,7 +4341,7 @@ static void _set_python_exception() { Py_DECREF(args); } - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4516,7 +4565,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -4539,10 +4588,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -4577,12 +4626,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -4989,7 +5034,7 @@ SWIGINTERN PyObject *_wrap_XmpPropertyInfo___getitem__(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "XmpPropertyInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpPropertyInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpPropertyInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -5042,7 +5087,7 @@ SWIGINTERN PyObject *_wrap_XmpPropertyInfo___setitem__(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "XmpPropertyInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpPropertyInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpPropertyInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -5131,7 +5176,7 @@ SWIGINTERN PyObject *_wrap_XmpNsInfo_xmpPropertyInfo__get(PyObject *self, PyObje PyObject* list = pointer_to_list(result); if (!list) SWIG_fail; - resultobj = SWIG_Python_AppendOutput(resultobj, list); + resultobj = SWIG_Python_AppendOutput(resultobj, list, 0); } return resultobj; fail: @@ -5320,7 +5365,7 @@ SWIGINTERN PyObject *_wrap_XmpNsInfo___getitem__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "XmpNsInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpNsInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpNsInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -5373,7 +5418,7 @@ SWIGINTERN PyObject *_wrap_XmpNsInfo___setitem__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "XmpNsInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpNsInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpNsInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -5417,7 +5462,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_propertyTitle(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_propertyTitle" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_propertyTitle" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_propertyTitle" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } arg1 = reinterpret_cast< Exiv2::XmpKey * >(argp1); result = (char *)Exiv2::XmpProperties::propertyTitle((Exiv2::XmpKey const &)*arg1); @@ -5443,7 +5488,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_propertyDesc(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_propertyDesc" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_propertyDesc" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_propertyDesc" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } arg1 = reinterpret_cast< Exiv2::XmpKey * >(argp1); result = (char *)Exiv2::XmpProperties::propertyDesc((Exiv2::XmpKey const &)*arg1); @@ -5469,7 +5514,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_propertyType(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_propertyType" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_propertyType" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_propertyType" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } arg1 = reinterpret_cast< Exiv2::XmpKey * >(argp1); result = (Exiv2::TypeId)Exiv2::XmpProperties::propertyType((Exiv2::XmpKey const &)*arg1); @@ -5499,7 +5544,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_propertyInfo(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_propertyInfo" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_propertyInfo" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_propertyInfo" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } arg1 = reinterpret_cast< Exiv2::XmpKey * >(argp1); result = (Exiv2::XmpPropertyInfo *)Exiv2::XmpProperties::propertyInfo((Exiv2::XmpKey const &)*arg1); @@ -5526,7 +5571,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_ns(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_ns" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_ns" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_ns" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5564,7 +5609,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_nsDesc(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_nsDesc" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_nsDesc" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_nsDesc" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5602,7 +5647,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_propertyList(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_propertyList" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_propertyList" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_propertyList" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5619,7 +5664,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_propertyList(PyObject *self, PyObject * PyObject* list = pointer_to_list(result); if (!list) SWIG_fail; - resultobj = SWIG_Python_AppendOutput(resultobj, list); + resultobj = SWIG_Python_AppendOutput(resultobj, list, 0); } if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -5645,7 +5690,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_nsInfo(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_nsInfo" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_nsInfo" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_nsInfo" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5683,7 +5728,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_prefix(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_prefix" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_prefix" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_prefix" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5713,7 +5758,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_registerNs(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_registerNs" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_registerNs" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_registerNs" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5724,7 +5769,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_registerNs(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpProperties_registerNs" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_registerNs" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_registerNs" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -5761,7 +5806,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_unregisterNs__SWIG_0(PyObject *self, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpProperties_unregisterNs" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpProperties_unregisterNs" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpProperties_unregisterNs" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5860,7 +5905,7 @@ SWIGINTERN PyObject *_wrap_XmpProperties_registeredNamespaces(PyObject *self, Py PyDict_SetItemString(dict, i->first.c_str(), value); Py_DECREF(value); } - resultobj = SWIG_Python_AppendOutput(resultobj, dict); + resultobj = SWIG_Python_AppendOutput(resultobj, dict, 1); } return resultobj; fail: @@ -5882,7 +5927,7 @@ SWIGINTERN int _wrap_new_XmpKey__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XmpKey" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XmpKey" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_XmpKey" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5920,7 +5965,7 @@ SWIGINTERN int _wrap_new_XmpKey__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XmpKey" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XmpKey" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_XmpKey" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5931,7 +5976,7 @@ SWIGINTERN int _wrap_new_XmpKey__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObje SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_XmpKey" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XmpKey" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_XmpKey" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -5968,7 +6013,7 @@ SWIGINTERN int _wrap_new_XmpKey__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XmpKey" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XmpKey" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_XmpKey" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } arg1 = reinterpret_cast< Exiv2::XmpKey * >(argp1); { @@ -6280,13 +6325,13 @@ static SwigPyGetSet XmpPropertyInfo_name__getset = { _wrap_XmpPropertyInfo_name_ static SwigPyGetSet XmpPropertyInfo_xmpValueType__getset = { _wrap_XmpPropertyInfo_xmpValueType__get, 0 }; static SwigPyGetSet XmpPropertyInfo_xmpCategory__getset = { _wrap_XmpPropertyInfo_xmpCategory__get, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XmpPropertyInfo_getset[] = { - { (char *)"title_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Property title or label", &XmpPropertyInfo_title__getset }, - { (char *)"typeId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Exiv2 default type for the property", &XmpPropertyInfo_typeId__getset }, - { (char *)"desc_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Property description", &XmpPropertyInfo_desc__getset }, - { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Property name", &XmpPropertyInfo___dict___getset }, - { (char *)"name_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Property name", &XmpPropertyInfo_name__getset }, - { (char *)"xmpValueType_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" XMP value type (for info only)", &XmpPropertyInfo_xmpValueType__getset }, - { (char *)"xmpCategory_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Category (internal or external)", &XmpPropertyInfo_xmpCategory__getset }, + { (char *)"title_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Property title or label", &XmpPropertyInfo_title__getset }, + { (char *)"typeId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Exiv2 default type for the property", &XmpPropertyInfo_typeId__getset }, + { (char *)"desc_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Property description", &XmpPropertyInfo_desc__getset }, + { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Property name", &XmpPropertyInfo___dict___getset }, + { (char *)"name_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Property name", &XmpPropertyInfo_name__getset }, + { (char *)"xmpValueType_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"XMP value type (for info only)", &XmpPropertyInfo_xmpValueType__getset }, + { (char *)"xmpCategory_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Category (internal or external)", &XmpPropertyInfo_xmpCategory__getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -6298,7 +6343,7 @@ SwigPyBuiltin__Exiv2__XmpPropertyInfo_richcompare(PyObject *self, PyObject *othe result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -6328,215 +6373,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpPropertyInfo_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpPropertyInfo_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.properties.XmpPropertyInfo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.properties.XmpPropertyInfo", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XmpPropertyInfo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XmpPropertyInfo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XmpPropertyInfo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XmpPropertyInfo_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__XmpPropertyInfo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__XmpPropertyInfo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__XmpPropertyInfo_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__XmpPropertyInfo_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Information about one XMP property.", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__XmpPropertyInfo_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_XmpPropertyInfo___iter___getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XmpPropertyInfo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XmpPropertyInfo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Information about one XMP property.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__XmpPropertyInfo_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_XmpPropertyInfo___iter___getiterfunc_closure, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__XmpPropertyInfo_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__XmpPropertyInfo_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - _wrap_XmpPropertyInfo___getitem__, /* mp_subscript */ - _wrap_XmpPropertyInfo___setitem___objobjargproc_closure, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + _wrap_XmpPropertyInfo___getitem__, /* mp_subscript */ + _wrap_XmpPropertyInfo___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpPropertyInfo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpPropertyInfo_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpPropertyInfo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpPropertyInfo_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpPropertyInfo'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpPropertyInfo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Information about one XMP property." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__XmpPropertyInfo_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__XmpPropertyInfo_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__XmpPropertyInfo_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)_wrap_XmpPropertyInfo___getitem__ }, + { Py_mp_ass_subscript, (void *)_wrap_XmpPropertyInfo___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_XmpPropertyInfo___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.properties.XmpPropertyInfo", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpPropertyInfo_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet XmpNsInfo_xmpPropertyInfo__getset = { _wrap_XmpNsInfo_xmpPropertyInfo__get, 0 }; static SwigPyGetSet XmpNsInfo_desc__getset = { _wrap_XmpNsInfo_desc__get, 0 }; @@ -6544,11 +6705,11 @@ static SwigPyGetSet XmpNsInfo___dict___getset = { SwigPyObject_get___dict__, 0 } static SwigPyGetSet XmpNsInfo_ns__getset = { _wrap_XmpNsInfo_ns__get, 0 }; static SwigPyGetSet XmpNsInfo_prefix__getset = { _wrap_XmpNsInfo_prefix__get, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XmpNsInfo_getset[] = { - { (char *)"xmpPropertyInfo_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" List of known properties", &XmpNsInfo_xmpPropertyInfo__getset }, - { (char *)"desc_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Brief description of the namespace", &XmpNsInfo_desc__getset }, - { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Namespace", &XmpNsInfo___dict___getset }, - { (char *)"ns_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Namespace", &XmpNsInfo_ns__getset }, - { (char *)"prefix_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" (Preferred) prefix", &XmpNsInfo_prefix__getset }, + { (char *)"xmpPropertyInfo_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"List of known properties", &XmpNsInfo_xmpPropertyInfo__getset }, + { (char *)"desc_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Brief description of the namespace", &XmpNsInfo_desc__getset }, + { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Namespace", &XmpNsInfo___dict___getset }, + { (char *)"ns_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Namespace", &XmpNsInfo_ns__getset }, + { (char *)"prefix_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"(Preferred) prefix", &XmpNsInfo_prefix__getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -6560,7 +6721,7 @@ SwigPyBuiltin__Exiv2__XmpNsInfo_richcompare(PyObject *self, PyObject *other, int result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -6590,215 +6751,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpNsInfo_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpNsInfo_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.properties.XmpNsInfo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.properties.XmpNsInfo", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XmpNsInfo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XmpNsInfo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XmpNsInfo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XmpNsInfo_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__XmpNsInfo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__XmpNsInfo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__XmpNsInfo_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__XmpNsInfo_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Structure mapping XMP namespaces and (preferred) prefixes.",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__XmpNsInfo_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_XmpNsInfo___iter___getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XmpNsInfo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XmpNsInfo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Structure mapping XMP namespaces and (preferred) prefixes.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__XmpNsInfo_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_XmpNsInfo___iter___getiterfunc_closure, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__XmpNsInfo_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__XmpNsInfo_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - _wrap_XmpNsInfo___getitem__, /* mp_subscript */ - _wrap_XmpNsInfo___setitem___objobjargproc_closure, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + _wrap_XmpNsInfo___getitem__, /* mp_subscript */ + _wrap_XmpNsInfo___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpNsInfo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpNsInfo_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpNsInfo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpNsInfo_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpNsInfo'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpNsInfo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Structure mapping XMP namespaces and (preferred) prefixes." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__XmpNsInfo_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__XmpNsInfo_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__XmpNsInfo_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)_wrap_XmpNsInfo___getitem__ }, + { Py_mp_ass_subscript, (void *)_wrap_XmpNsInfo___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_XmpNsInfo___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.properties.XmpNsInfo", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpNsInfo_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet XmpProperties___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XmpProperties_getset[] = { @@ -6821,7 +7098,7 @@ SwigPyBuiltin__Exiv2__XmpProperties_richcompare(PyObject *self, PyObject *other, result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -6938,219 +7215,335 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpProperties_methods[] = { "\n" "Notes: This invalidates XMP keys generated in any custom namespace.\n" "" }, - { "registeredNamespaces", (PyCFunction)(void(*)(void))_wrap_XmpProperties_registeredNamespaces, METH_STATIC|METH_NOARGS, " Get all registered namespaces (for both Exiv2 and XMPsdk)" }, + { "registeredNamespaces", (PyCFunction)(void(*)(void))_wrap_XmpProperties_registeredNamespaces, METH_STATIC|METH_NOARGS, "Get all registered namespaces (for both Exiv2 and XMPsdk)" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpProperties_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.properties.XmpProperties", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.properties.XmpProperties", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XmpProperties_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XmpProperties_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XmpProperties_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XmpProperties_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__XmpProperties_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__XmpProperties_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__XmpProperties_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__XmpProperties_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " XMP property reference, implemented as a static class.", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__XmpProperties_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XmpProperties_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XmpProperties_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "XMP property reference, implemented as a static class.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__XmpProperties_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__XmpProperties_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__XmpProperties_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpProperties_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpProperties_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpProperties_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpProperties_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpProperties'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpProperties_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"XMP property reference, implemented as a static class." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__XmpProperties_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__XmpProperties_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__XmpProperties_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.properties.XmpProperties", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpProperties_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet XmpKey___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XmpKey_getset[] = { @@ -7195,7 +7588,7 @@ SwigPyBuiltin__Exiv2__XmpKey_richcompare(PyObject *self, PyObject *other, int op result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -7211,221 +7604,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpKey_methods[] = { { "tagName", _wrap_XmpKey_tagName, METH_NOARGS, "" }, { "tagLabel", _wrap_XmpKey_tagLabel, METH_NOARGS, "" }, { "tagDesc", _wrap_XmpKey_tagDesc, METH_NOARGS, "" }, - { "tag", _wrap_XmpKey_tag, METH_NOARGS, " Properties don't have a tag number. Return 0." }, + { "tag", _wrap_XmpKey_tag, METH_NOARGS, "Properties don't have a tag number. Return 0." }, { "clone", _wrap_XmpKey_clone, METH_NOARGS, "" }, - { "ns", _wrap_XmpKey_ns, METH_NOARGS, " Return the schema namespace for the prefix of the key" }, + { "ns", _wrap_XmpKey_ns, METH_NOARGS, "Return the schema namespace for the prefix of the key" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpKey_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.properties.XmpKey", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_XmpKey_destructor_closure, /* tp_dealloc */ + "exiv2.properties.XmpKey", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_XmpKey_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XmpKey_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XmpKey_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XmpKey_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - _wrap_XmpKey_key_reprfunc_closure, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XmpKey_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__XmpKey_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__XmpKey_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__XmpKey_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + _wrap_XmpKey_key_reprfunc_closure, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__XmpKey_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Concrete keys for XMP metadata.", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ + "Concrete keys for XMP metadata.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ SwigPyBuiltin__Exiv2__XmpKey_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XmpKey_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XmpKey_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_XmpKey, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__XmpKey_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__XmpKey_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_XmpKey, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpKey_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpKey_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpKey_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpKey_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpKey'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpKey_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_XmpKey }, + { Py_tp_dealloc, (void *)_wrap_delete_XmpKey_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Concrete keys for XMP metadata." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)_wrap_XmpKey_key_reprfunc_closure }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__XmpKey_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__XmpKey_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__XmpKey_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.properties.XmpKey", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpKey_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -7990,7 +8499,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -8173,7 +8682,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -8212,79 +8721,67 @@ SWIG_init(void) { "XmpCategory", "Category of an XMP property.", _get_enum_list(0, "xmpInternal",Exiv2::xmpInternal,"xmpExternal",Exiv2::xmpExternal,"Internal",Exiv2::xmpInternal,"External",Exiv2::xmpExternal, NULL))); /* type 'Exiv2::XmpPropertyInfo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpPropertyInfo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpPropertyInfo'."); + builtin_pytype = SwigPyBuiltin__Exiv2__XmpPropertyInfo_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__XmpPropertyInfo_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpPropertyInfo", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpPropertyInfo"); d = md; /* type 'Exiv2::XmpNsInfo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpNsInfo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpNsInfo'."); + builtin_pytype = SwigPyBuiltin__Exiv2__XmpNsInfo_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__XmpNsInfo_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpNsInfo", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpNsInfo"); d = md; /* type 'Exiv2::XmpProperties' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpProperties_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpProperties'."); + builtin_pytype = SwigPyBuiltin__Exiv2__XmpProperties_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__XmpProperties_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpProperties", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpProperties"); d = md; /* type 'Exiv2::XmpKey' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpKey_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Key"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -8298,18 +8795,18 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpKey'."); + builtin_pytype = SwigPyBuiltin__Exiv2__XmpKey_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__XmpKey_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpKey", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpKey"); d = md; diff --git a/src/swig-0_28_3/tags.py b/src/swig-0_28_3/tags.py index a5f274ea..290d8e16 100644 --- a/src/swig-0_28_3/tags.py +++ b/src/swig-0_28_3/tags.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_28_3/tags_wrap.cxx b/src/swig-0_28_3/tags_wrap.cxx index 75b5a03c..3a7bd2c3 100644 --- a/src/swig-0_28_3/tags_wrap.cxx +++ b/src/swig-0_28_3/tags_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_tags" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -4004,7 +4056,6 @@ static swig_module_info swig_module = {swig_types, 50, 0, 0, 0, 0}; # define SWIG_init init_tags #endif -#define SWIG_name "_tags" #ifdef __cplusplus #include @@ -4074,7 +4125,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4082,7 +4133,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4090,8 +4141,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4100,7 +4151,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4123,7 +4174,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4137,11 +4188,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4292,7 +4341,7 @@ static void _set_python_exception() { Py_DECREF(args); } - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4547,7 +4596,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -4570,10 +4619,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -4608,12 +4657,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -5042,7 +5087,7 @@ SWIGINTERN PyObject *_wrap__TagListFct___call__(PyObject *self, PyObject *args) PyObject* list = pointer_to_list(result); if (!list) SWIG_fail; - resultobj = SWIG_Python_AppendOutput(resultobj, list); + resultobj = SWIG_Python_AppendOutput(resultobj, list, 0); } return resultobj; fail: @@ -5292,7 +5337,7 @@ SWIGINTERN PyObject *_wrap_GroupInfo___getitem__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GroupInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GroupInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "GroupInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -5337,7 +5382,7 @@ SWIGINTERN PyObject *_wrap_GroupInfo___setitem__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GroupInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GroupInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "GroupInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -5666,7 +5711,7 @@ SWIGINTERN PyObject *_wrap_TagInfo___getitem__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TagInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TagInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "TagInfo___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -5711,7 +5756,7 @@ SWIGINTERN PyObject *_wrap_TagInfo___setitem__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TagInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TagInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "TagInfo___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -5742,7 +5787,7 @@ SWIGINTERN PyObject *_wrap_ExifTags_groupList(PyObject *self, PyObject *args) { PyObject* list = pointer_to_list(result); if (!list) SWIG_fail; - resultobj = SWIG_Python_AppendOutput(resultobj, list); + resultobj = SWIG_Python_AppendOutput(resultobj, list, 0); } return resultobj; fail: @@ -5766,7 +5811,7 @@ SWIGINTERN PyObject *_wrap_ExifTags_tagList(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExifTags_tagList" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifTags_tagList" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifTags_tagList" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5775,7 +5820,7 @@ SWIGINTERN PyObject *_wrap_ExifTags_tagList(PyObject *self, PyObject *args) { PyObject* list = pointer_to_list(result); if (!list) SWIG_fail; - resultobj = SWIG_Python_AppendOutput(resultobj, list); + resultobj = SWIG_Python_AppendOutput(resultobj, list, 0); } if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; @@ -5800,7 +5845,7 @@ SWIGINTERN PyObject *_wrap_ExifTags_sectionName(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExifTags_sectionName" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifTags_sectionName" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifTags_sectionName" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifKey * >(argp1); result = (char *)Exiv2::ExifTags::sectionName((Exiv2::ExifKey const &)*arg1); @@ -5826,7 +5871,7 @@ SWIGINTERN PyObject *_wrap_ExifTags_defaultCount(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExifTags_defaultCount" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifTags_defaultCount" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifTags_defaultCount" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifKey * >(argp1); result = (uint16_t)Exiv2::ExifTags::defaultCount((Exiv2::ExifKey const &)*arg1); @@ -5853,7 +5898,7 @@ SWIGINTERN PyObject *_wrap_ExifTags_ifdName(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExifTags_ifdName" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifTags_ifdName" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifTags_ifdName" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5883,7 +5928,7 @@ SWIGINTERN PyObject *_wrap_ExifTags_isMakerGroup(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExifTags_isMakerGroup" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifTags_isMakerGroup" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifTags_isMakerGroup" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5913,7 +5958,7 @@ SWIGINTERN PyObject *_wrap_ExifTags_isExifGroup(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExifTags_isExifGroup" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExifTags_isExifGroup" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ExifTags_isExifGroup" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5955,7 +6000,7 @@ SWIGINTERN int _wrap_new_ExifKey__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ExifKey" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ExifKey" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_ExifKey" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5999,7 +6044,7 @@ SWIGINTERN int _wrap_new_ExifKey__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObj SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ExifKey" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ExifKey" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_ExifKey" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -6034,7 +6079,7 @@ SWIGINTERN int _wrap_new_ExifKey__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ExifKey" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ExifKey" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_ExifKey" "', argument " "1"" of type '" "Exiv2::ExifKey const &""'"); } arg1 = reinterpret_cast< Exiv2::ExifKey * >(argp1); { @@ -6391,7 +6436,7 @@ SwigPyBuiltin___TagListFct_richcompare(PyObject *self, PyObject *other, int op) result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -6402,215 +6447,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin___TagListFct_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin___TagListFct_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.tags._TagListFct", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete__TagListFct_destructor_closure, /* tp_dealloc */ + "exiv2.tags._TagListFct", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete__TagListFct_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin___TagListFct_type.as_number, /* tp_as_number */ - &SwigPyBuiltin___TagListFct_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin___TagListFct_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - _wrap__TagListFct___call___ternarycallfunc_closure, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin___TagListFct_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin___TagListFct_type.as_number, /* tp_as_number */ + &SwigPyBuiltin___TagListFct_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin___TagListFct_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + _wrap__TagListFct___call___ternarycallfunc_closure, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin___TagListFct_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - "::_TagListFct", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin___TagListFct_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin___TagListFct_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin___TagListFct_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "::_TagListFct", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin___TagListFct_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin___TagListFct_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin___TagListFct_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin___TagListFct_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin___TagListFct_type}; +static PyTypeObject *SwigPyBuiltin___TagListFct_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin___TagListFct_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type '_TagListFct'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin___TagListFct_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete__TagListFct_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"::_TagListFct" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin___TagListFct_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin___TagListFct_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin___TagListFct_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)_wrap__TagListFct___call___ternarycallfunc_closure }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.tags._TagListFct", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin___TagListFct_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet GroupInfo_ifdId__getset = { _wrap_GroupInfo_ifdId__get, 0 }; static SwigPyGetSet GroupInfo_groupName__getset = { _wrap_GroupInfo_groupName__get, 0 }; @@ -6618,11 +6779,11 @@ static SwigPyGetSet GroupInfo___dict___getset = { SwigPyObject_get___dict__, 0 } static SwigPyGetSet GroupInfo_ifdName__getset = { _wrap_GroupInfo_ifdName__get, 0 }; static SwigPyGetSet GroupInfo_tagList__getset = { _wrap_GroupInfo_tagList__get, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__GroupInfo_getset[] = { - { (char *)"ifdId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" IFD id", &GroupInfo_ifdId__getset }, - { (char *)"groupName_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Group name, unique for each group.", &GroupInfo_groupName__getset }, - { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" IFD id", &GroupInfo___dict___getset }, - { (char *)"ifdName_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" IFD name", &GroupInfo_ifdName__getset }, - { (char *)"tagList_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Tag list", &GroupInfo_tagList__getset }, + { (char *)"ifdId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"IFD id", &GroupInfo_ifdId__getset }, + { (char *)"groupName_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Group name, unique for each group.", &GroupInfo_groupName__getset }, + { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"IFD id", &GroupInfo___dict___getset }, + { (char *)"ifdName_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"IFD name", &GroupInfo_ifdName__getset }, + { (char *)"tagList_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Tag list", &GroupInfo_tagList__getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -6634,7 +6795,7 @@ SwigPyBuiltin__Exiv2__GroupInfo_richcompare(PyObject *self, PyObject *other, int result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -6664,215 +6825,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__GroupInfo_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__GroupInfo_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.tags.GroupInfo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.tags.GroupInfo", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__GroupInfo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__GroupInfo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__GroupInfo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__GroupInfo_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__GroupInfo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__GroupInfo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__GroupInfo_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__GroupInfo_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " The details of an Exif group. Groups include IFDs and binary arrays.",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__GroupInfo_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_GroupInfo___iter___getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__GroupInfo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__GroupInfo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "The details of an Exif group. Groups include IFDs and binary arrays.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__GroupInfo_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_GroupInfo___iter___getiterfunc_closure, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__GroupInfo_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__GroupInfo_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - _wrap_GroupInfo___getitem__, /* mp_subscript */ - _wrap_GroupInfo___setitem___objobjargproc_closure, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + _wrap_GroupInfo___getitem__, /* mp_subscript */ + _wrap_GroupInfo___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__GroupInfo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__GroupInfo_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__GroupInfo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__GroupInfo_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'GroupInfo'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__GroupInfo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"The details of an Exif group. Groups include IFDs and binary arrays." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__GroupInfo_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__GroupInfo_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__GroupInfo_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)_wrap_GroupInfo___getitem__ }, + { Py_mp_ass_subscript, (void *)_wrap_GroupInfo___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_GroupInfo___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.tags.GroupInfo", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__GroupInfo_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet TagInfo_tag__getset = { _wrap_TagInfo_tag__get, 0 }; static SwigPyGetSet TagInfo_title__getset = { _wrap_TagInfo_title__get, 0 }; @@ -6884,15 +7161,15 @@ static SwigPyGetSet TagInfo___dict___getset = { SwigPyObject_get___dict__, 0 }; static SwigPyGetSet TagInfo_count__getset = { _wrap_TagInfo_count__get, 0 }; static SwigPyGetSet TagInfo_name__getset = { _wrap_TagInfo_name__get, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__TagInfo_getset[] = { - { (char *)"tag_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Tag", &TagInfo_tag__getset }, - { (char *)"title_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Tag title", &TagInfo_title__getset }, - { (char *)"sectionId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Section id", &TagInfo_sectionId__getset }, - { (char *)"desc_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Short tag description", &TagInfo_desc__getset }, - { (char *)"typeId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Type id", &TagInfo_typeId__getset }, - { (char *)"ifdId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Link to the (preferred) IFD", &TagInfo_ifdId__getset }, - { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Tag", &TagInfo___dict___getset }, - { (char *)"count_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" The number of values (not bytes!), 0=any, -1=count not known.", &TagInfo_count__getset }, - { (char *)"name_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" One word tag label", &TagInfo_name__getset }, + { (char *)"tag_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Tag", &TagInfo_tag__getset }, + { (char *)"title_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Tag title", &TagInfo_title__getset }, + { (char *)"sectionId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Section id", &TagInfo_sectionId__getset }, + { (char *)"desc_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Short tag description", &TagInfo_desc__getset }, + { (char *)"typeId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Type id", &TagInfo_typeId__getset }, + { (char *)"ifdId_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Link to the (preferred) IFD", &TagInfo_ifdId__getset }, + { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Tag", &TagInfo___dict___getset }, + { (char *)"count_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"The number of values (not bytes!), 0=any, -1=count not known.", &TagInfo_count__getset }, + { (char *)"name_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"One word tag label", &TagInfo_name__getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -6904,7 +7181,7 @@ SwigPyBuiltin__Exiv2__TagInfo_richcompare(PyObject *self, PyObject *other, int o result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -6934,219 +7211,335 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__TagInfo_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__TagInfo_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.tags.TagInfo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.tags.TagInfo", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__TagInfo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__TagInfo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__TagInfo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__TagInfo_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__TagInfo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__TagInfo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__TagInfo_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__TagInfo_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Tag information", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__TagInfo_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_TagInfo___iter___getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__TagInfo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__TagInfo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Tag information", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__TagInfo_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_TagInfo___iter___getiterfunc_closure, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__TagInfo_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__TagInfo_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - _wrap_TagInfo___getitem__, /* mp_subscript */ - _wrap_TagInfo___setitem___objobjargproc_closure, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + _wrap_TagInfo___getitem__, /* mp_subscript */ + _wrap_TagInfo___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__TagInfo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__TagInfo_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__TagInfo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__TagInfo_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'TagInfo'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__TagInfo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Tag information" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__TagInfo_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__TagInfo_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__TagInfo_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)_wrap_TagInfo___getitem__ }, + { Py_mp_ass_subscript, (void *)_wrap_TagInfo___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_TagInfo___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.tags.TagInfo", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__TagInfo_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet ExifTags___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ExifTags_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)" Return read-only list of built-in groups", &ExifTags___dict___getset }, + { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"Return read-only list of built-in groups", &ExifTags___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -7158,19 +7551,19 @@ SwigPyBuiltin__Exiv2__ExifTags_richcompare(PyObject *self, PyObject *other, int result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; } SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ExifTags_methods[] = { - { "groupList", (PyCFunction)(void(*)(void))_wrap_ExifTags_groupList, METH_STATIC|METH_NOARGS, " Return read-only list of built-in groups" }, - { "tagList", (PyCFunction)(void(*)(void))_wrap_ExifTags_tagList, METH_STATIC|METH_O, " Return read-only list of built-in *groupName* tags." }, - { "sectionName", (PyCFunction)(void(*)(void))_wrap_ExifTags_sectionName, METH_STATIC|METH_O, " Return the name of the section for an Exif *key*." }, - { "defaultCount", (PyCFunction)(void(*)(void))_wrap_ExifTags_defaultCount, METH_STATIC|METH_O, " Return the default number of components (not bytes!) *key* has. (0=any, -1=count not known)" }, - { "ifdName", (PyCFunction)(void(*)(void))_wrap_ExifTags_ifdName, METH_STATIC|METH_O, " Return the name of the IFD for the group." }, - { "isMakerGroup", (PyCFunction)(void(*)(void))_wrap_ExifTags_isMakerGroup, METH_STATIC|METH_O, " Return true if *groupName* is a makernote group." }, + { "groupList", (PyCFunction)(void(*)(void))_wrap_ExifTags_groupList, METH_STATIC|METH_NOARGS, "Return read-only list of built-in groups" }, + { "tagList", (PyCFunction)(void(*)(void))_wrap_ExifTags_tagList, METH_STATIC|METH_O, "Return read-only list of built-in *groupName* tags." }, + { "sectionName", (PyCFunction)(void(*)(void))_wrap_ExifTags_sectionName, METH_STATIC|METH_O, "Return the name of the section for an Exif *key*." }, + { "defaultCount", (PyCFunction)(void(*)(void))_wrap_ExifTags_defaultCount, METH_STATIC|METH_O, "Return the default number of components (not bytes!) *key* has. (0=any, -1=count not known)" }, + { "ifdName", (PyCFunction)(void(*)(void))_wrap_ExifTags_ifdName, METH_STATIC|METH_O, "Return the name of the IFD for the group." }, + { "isMakerGroup", (PyCFunction)(void(*)(void))_wrap_ExifTags_isMakerGroup, METH_STATIC|METH_O, "Return true if *groupName* is a makernote group." }, { "isExifGroup", (PyCFunction)(void(*)(void))_wrap_ExifTags_isExifGroup, METH_STATIC|METH_O, "\n" "Return true if *groupName* is a TIFF or Exif IFD, else false.\n" " This is used to differentiate between standard Exif IFDs\n" @@ -7179,215 +7572,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ExifTags_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ExifTags_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.tags.ExifTags", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.tags.ExifTags", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ExifTags_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__ExifTags_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ExifTags_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ExifTags_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ExifTags_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ExifTags_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__ExifTags_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ExifTags_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Access to Exif group and tag lists and misc. tag reference methods, implemented as a static class.",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ExifTags_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ExifTags_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ExifTags_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_ExifTags, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Access to Exif group and tag lists and misc. tag reference methods, implemented as a static class.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ExifTags_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ExifTags_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ExifTags_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_ExifTags, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ExifTags_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifTags_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ExifTags_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifTags_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifTags'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ExifTags_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_ExifTags }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Access to Exif group and tag lists and misc. tag reference methods, implemented as a static class." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ExifTags_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ExifTags_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ExifTags_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.tags.ExifTags", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ExifTags_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet ExifKey___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ExifKey_getset[] = { @@ -7432,14 +7941,14 @@ SwigPyBuiltin__Exiv2__ExifKey_richcompare(PyObject *self, PyObject *other, int o result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; } SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ExifKey_methods[] = { - { "setIdx", _wrap_ExifKey_setIdx, METH_O, " Set the index." }, + { "setIdx", _wrap_ExifKey_setIdx, METH_O, "Set the index." }, { "key", _wrap_ExifKey_key, METH_NOARGS, "" }, { "familyName", _wrap_ExifKey_familyName, METH_NOARGS, "" }, { "groupName", _wrap_ExifKey_groupName, METH_NOARGS, "" }, @@ -7447,221 +7956,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ExifKey_methods[] = { { "tag", _wrap_ExifKey_tag, METH_NOARGS, "" }, { "tagLabel", _wrap_ExifKey_tagLabel, METH_NOARGS, "" }, { "tagDesc", _wrap_ExifKey_tagDesc, METH_NOARGS, "" }, - { "defaultTypeId", _wrap_ExifKey_defaultTypeId, METH_NOARGS, " Return the default type id for this tag." }, + { "defaultTypeId", _wrap_ExifKey_defaultTypeId, METH_NOARGS, "Return the default type id for this tag." }, { "clone", _wrap_ExifKey_clone, METH_NOARGS, "" }, - { "idx", _wrap_ExifKey_idx, METH_NOARGS, " Return the index (unique id of this key within the original Exif data, 0 if not set)" }, + { "idx", _wrap_ExifKey_idx, METH_NOARGS, "Return the index (unique id of this key within the original Exif data, 0 if not set)" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ExifKey_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.tags.ExifKey", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_ExifKey_destructor_closure, /* tp_dealloc */ + "exiv2.tags.ExifKey", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_ExifKey_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ExifKey_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__ExifKey_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ExifKey_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - _wrap_ExifKey_key_reprfunc_closure, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ExifKey_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ExifKey_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ExifKey_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__ExifKey_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + _wrap_ExifKey_key_reprfunc_closure, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ExifKey_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Concrete keys for Exif metadata and access to Exif tag reference data.",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ExifKey_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ExifKey_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ExifKey_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_ExifKey, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Concrete keys for Exif metadata and access to Exif tag reference data.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ExifKey_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ExifKey_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ExifKey_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_ExifKey, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ExifKey_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifKey_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ExifKey_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifKey_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifKey'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ExifKey_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_ExifKey }, + { Py_tp_dealloc, (void *)_wrap_delete_ExifKey_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Concrete keys for Exif metadata and access to Exif tag reference data." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)_wrap_ExifKey_key_reprfunc_closure }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ExifKey_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ExifKey_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ExifKey_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.tags.ExifKey", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ExifKey_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -8226,7 +8851,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -8409,7 +9034,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -8453,102 +9078,87 @@ SWIG_init(void) { "\nExif standard.", _get_enum_list(0, "sectionIfNotSet",Exiv2::SectionId::sectionIdNotSet,"imgStruct",Exiv2::SectionId::imgStruct,"recOffset",Exiv2::SectionId::recOffset,"imgCharacter",Exiv2::SectionId::imgCharacter,"otherTags",Exiv2::SectionId::otherTags,"exifFormat",Exiv2::SectionId::exifFormat,"exifVersion",Exiv2::SectionId::exifVersion,"imgConfig",Exiv2::SectionId::imgConfig,"userInfo",Exiv2::SectionId::userInfo,"relatedFile",Exiv2::SectionId::relatedFile,"dateTime",Exiv2::SectionId::dateTime,"captureCond",Exiv2::SectionId::captureCond,"gpsTags",Exiv2::SectionId::gpsTags,"iopTags",Exiv2::SectionId::iopTags,"mpfTags",Exiv2::SectionId::mpfTags,"makerTags",Exiv2::SectionId::makerTags,"dngTags",Exiv2::SectionId::dngTags,"panaRaw",Exiv2::SectionId::panaRaw,"tiffEp",Exiv2::SectionId::tiffEp,"tiffPm6",Exiv2::SectionId::tiffPm6,"adobeOpi",Exiv2::SectionId::adobeOpi,"lastSectionId",Exiv2::SectionId::lastSectionId, NULL))); /* type '::_TagListFct' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin___TagListFct_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type '_TagListFct'."); + builtin_pytype = SwigPyBuiltin___TagListFct_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin___TagListFct_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "_TagListFct", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "_TagListFct"); d = md; /* type 'Exiv2::GroupInfo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__GroupInfo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'GroupInfo'."); + builtin_pytype = SwigPyBuiltin__Exiv2__GroupInfo_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__GroupInfo_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "GroupInfo", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "GroupInfo"); d = md; /* type 'Exiv2::TagInfo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__TagInfo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'TagInfo'."); + builtin_pytype = SwigPyBuiltin__Exiv2__TagInfo_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__TagInfo_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "TagInfo", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "TagInfo"); d = md; /* type 'Exiv2::ExifTags' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifTags_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifTags'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ExifTags_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ExifTags_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "ExifTags", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "ExifTags"); d = md; /* type 'Exiv2::ExifKey' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ExifKey_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Key"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -8562,18 +9172,18 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifKey'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ExifKey_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ExifKey_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "ExifKey", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "ExifKey"); d = md; diff --git a/src/swig-0_28_3/types.py b/src/swig-0_28_3/types.py index 78bbe150..a34e6fec 100644 --- a/src/swig-0_28_3/types.py +++ b/src/swig-0_28_3/types.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_28_3/types_wrap.cxx b/src/swig-0_28_3/types_wrap.cxx index 3000c42a..654b4086 100644 --- a/src/swig-0_28_3/types_wrap.cxx +++ b/src/swig-0_28_3/types_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_types" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -3970,7 +4022,6 @@ static swig_module_info swig_module = {swig_types, 16, 0, 0, 0, 0}; # define SWIG_init init_types #endif -#define SWIG_name "_types" #ifdef __cplusplus #include @@ -4040,7 +4091,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4048,7 +4099,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4056,8 +4107,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4066,7 +4117,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4089,7 +4140,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4103,11 +4154,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4278,7 +4327,7 @@ static void _set_python_exception() { Py_DECREF(args); } - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4367,7 +4416,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -4390,10 +4439,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -4593,12 +4642,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -5357,7 +5402,7 @@ SwigPython_std_pair_repr (PyObject *o) PyTuple_SET_ITEM(tuple, 0, PyObject_GetAttrString(o, (char*) "first")); PyTuple_SET_ITEM(tuple, 1, PyObject_GetAttrString(o, (char*) "second")); PyObject *result = PyObject_Repr(tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -5570,7 +5615,7 @@ SWIGINTERN PyObject *_wrap_TypeInfo_typeId(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TypeInfo_typeId" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TypeInfo_typeId" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "TypeInfo_typeId" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -5721,7 +5766,7 @@ SWIGINTERN int _wrap_new_DataBuf__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObj arg1 = static_cast< size_t >(val1); { try { - result = (Exiv2::DataBuf *)new Exiv2::DataBuf(arg1); + result = (Exiv2::DataBuf *)new Exiv2::DataBuf(SWIG_STD_MOVE(arg1)); } catch(std::exception const& e) { _set_python_exception(); @@ -5756,7 +5801,7 @@ SWIGINTERN int _wrap_new_DataBuf__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObj } { try { - result = (Exiv2::DataBuf *)new Exiv2::DataBuf((Exiv2::byte const *)arg1,arg2); + result = (Exiv2::DataBuf *)new Exiv2::DataBuf((Exiv2::byte const *)arg1,SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -5844,7 +5889,7 @@ SWIGINTERN PyObject *_wrap_DataBuf_alloc(PyObject *self, PyObject *args) { arg2 = static_cast< size_t >(val2); { try { - (arg1)->alloc(arg2); + (arg1)->alloc(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -5882,7 +5927,7 @@ SWIGINTERN PyObject *_wrap_DataBuf_resize(PyObject *self, PyObject *args) { arg2 = static_cast< size_t >(val2); { try { - (arg1)->resize(arg2); + (arg1)->resize(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -5975,7 +6020,7 @@ SWIGINTERN PyObject *_wrap_DataBuf_cmpBytes(PyObject *self, PyObject *args) { } { try { - result = (int)((Exiv2::DataBuf const *)arg1)->cmpBytes(arg2,(void const *)arg3,arg4); + result = (int)((Exiv2::DataBuf const *)arg1)->cmpBytes(SWIG_STD_MOVE(arg2),(void const *)arg3,SWIG_STD_MOVE(arg4)); } catch(std::exception const& e) { _set_python_exception(); @@ -6119,7 +6164,7 @@ SWIGINTERN PyObject *_wrap_DataBuf___eq__(PyObject *self, PyObject *args) { return NULL; } PyErr_Clear(); - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } @@ -6175,7 +6220,7 @@ SWIGINTERN PyObject *_wrap_DataBuf___ne__(PyObject *self, PyObject *args) { return NULL; } PyErr_Clear(); - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } @@ -6318,7 +6363,7 @@ SWIGINTERN int _wrap_new_URational__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_URational" "', argument " "1"" of type '" "std::pair< uint32_t,uint32_t > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_URational" "', argument " "1"" of type '" "std::pair< uint32_t,uint32_t > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_URational" "', argument " "1"" of type '" "std::pair< uint32_t,uint32_t > const &""'"); } arg1 = ptr; } @@ -6580,7 +6625,7 @@ SWIGINTERN int _wrap_new_Rational__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Rational" "', argument " "1"" of type '" "std::pair< int32_t,int32_t > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Rational" "', argument " "1"" of type '" "std::pair< int32_t,int32_t > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_Rational" "', argument " "1"" of type '" "std::pair< int32_t,int32_t > const &""'"); } arg1 = ptr; } @@ -6793,228 +6838,344 @@ SwigPyBuiltin__Exiv2__TypeInfo_richcompare(PyObject *self, PyObject *other, int result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; } SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__TypeInfo_methods[] = { - { "typeName", (PyCFunction)(void(*)(void))_wrap_TypeInfo_typeName, METH_STATIC|METH_O, " Return the name of the type, 0 if unknown." }, - { "typeId", (PyCFunction)(void(*)(void))_wrap_TypeInfo_typeId, METH_STATIC|METH_O, " Return the type id for a type name" }, - { "typeSize", (PyCFunction)(void(*)(void))_wrap_TypeInfo_typeSize, METH_STATIC|METH_O, " Return the size in bytes of one element of this type" }, + { "typeName", (PyCFunction)(void(*)(void))_wrap_TypeInfo_typeName, METH_STATIC|METH_O, "Return the name of the type, 0 if unknown." }, + { "typeId", (PyCFunction)(void(*)(void))_wrap_TypeInfo_typeId, METH_STATIC|METH_O, "Return the type id for a type name" }, + { "typeSize", (PyCFunction)(void(*)(void))_wrap_TypeInfo_typeSize, METH_STATIC|METH_O, "Return the size in bytes of one element of this type" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__TypeInfo_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.types.TypeInfo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ + "exiv2.types.TypeInfo", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ _wrap_delete_TypeInfo_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__TypeInfo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__TypeInfo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__TypeInfo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__TypeInfo_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__TypeInfo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__TypeInfo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__TypeInfo_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__TypeInfo_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Type information lookup functions. Implemented as a static class.",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__TypeInfo_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__TypeInfo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__TypeInfo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_TypeInfo, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Type information lookup functions. Implemented as a static class.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__TypeInfo_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__TypeInfo_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__TypeInfo_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_TypeInfo, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__TypeInfo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__TypeInfo_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__TypeInfo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__TypeInfo_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'TypeInfo'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__TypeInfo_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_TypeInfo }, + { Py_tp_dealloc, (void *)_wrap_delete_TypeInfo_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Type information lookup functions. Implemented as a static class." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__TypeInfo_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__TypeInfo_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__TypeInfo_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.types.TypeInfo", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__TypeInfo_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet DataBuf___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__DataBuf_getset[] = { @@ -7048,7 +7209,7 @@ SwigPyBuiltin__Exiv2__DataBuf_richcompare(PyObject *self, PyObject *other, int o result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -7060,10 +7221,10 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DataBuf_methods[] = { " the requested *size* is less than the current buffer size, no\n" " new memory is allocated and the buffer size doesn't change.\n" "" }, - { "resize", _wrap_DataBuf_resize, METH_O, " Resize the buffer. Existing data is preserved (like std::realloc())." }, - { "reset", _wrap_DataBuf_reset, METH_NOARGS, " Reset value" }, + { "resize", _wrap_DataBuf_resize, METH_O, "Resize the buffer. Existing data is preserved (like std::realloc())." }, + { "reset", _wrap_DataBuf_reset, METH_NOARGS, "Reset value" }, { "size", _wrap_DataBuf_size, METH_NOARGS, "" }, - { "cmpBytes", _wrap_DataBuf_cmpBytes, METH_VARARGS, " Equivalent to: memcmp(&pData_[offset], buf, bufsize)" }, + { "cmpBytes", _wrap_DataBuf_cmpBytes, METH_VARARGS, "Equivalent to: memcmp(&pData_[offset], buf, bufsize)" }, { "data", _wrap_DataBuf_data, METH_NOARGS, "\n" "Returns a temporary Python memoryview of the object's data.\n" "\n" @@ -7078,42 +7239,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DataBuf_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__DataBuf_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.types.DataBuf", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_DataBuf_destructor_closure, /* tp_dealloc */ + "exiv2.types.DataBuf", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_DataBuf_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__DataBuf_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__DataBuf_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__DataBuf_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__DataBuf_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__DataBuf_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__DataBuf_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__DataBuf_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__DataBuf_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -7122,176 +7284,296 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__DataBuf_type = { " care of memory allocation and deletion. Its primary use is meant to\n" " be as a stack variable in functions that need a temporary data\n" " buffer.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__DataBuf_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__DataBuf_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__DataBuf_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_DataBuf, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__DataBuf_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__DataBuf_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__DataBuf_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_DataBuf, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_DataBuf___len___lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + _wrap_DataBuf___len___lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - getbuffer_Exiv2_DataBuf, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + getbuffer_Exiv2_DataBuf, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__DataBuf_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__DataBuf_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__DataBuf_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__DataBuf_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'DataBuf'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__DataBuf_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_DataBuf }, + { Py_tp_dealloc, (void *)_wrap_delete_DataBuf_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Utility class containing a character array. All it does is to take\n" + " care of memory allocation and deletion. Its primary use is meant to\n" + " be as a stack variable in functions that need a temporary data\n" + " buffer.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__DataBuf_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__DataBuf_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__DataBuf_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_DataBuf___len___lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.types.DataBuf", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__DataBuf_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet URational_first_getset = { _wrap_URational_first_get, _wrap_URational_first_set }; static SwigPyGetSet URational___dict___getset = { SwigPyObject_get___dict__, 0 }; @@ -7314,7 +7596,7 @@ SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_richcompare(PyObject *self, PyObje result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -7324,215 +7606,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_methods[] = { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.types.URational", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_URational_destructor_closure,/* tp_dealloc */ + "exiv2.types.URational", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_URational_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - SwigPython_std_pair_repr, /* tp_repr */ - &SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type.as_number,/* tp_as_number */ - &SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type.as_sequence,/* tp_as_sequence */ - &SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type.as_mapping,/* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type.as_buffer,/* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + SwigPython_std_pair_repr, /* tp_repr */ + &SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - "std::pair< uint32_t,uint32_t >", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_URational, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "std::pair< uint32_t,uint32_t >", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_URational, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - SwigPython_std_pair_len, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - SwigPython_std_pair_getitem, /* sq_item */ + SwigPython_std_pair_len, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + SwigPython_std_pair_getitem, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - SwigPython_std_pair_setitem, /* sq_ass_item */ + SwigPython_std_pair_setitem, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type}; +static PyTypeObject *SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'URational'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_URational }, + { Py_tp_dealloc, (void *)_wrap_delete_URational_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"std::pair< uint32_t,uint32_t >" }, + { Py_tp_repr, (void *)SwigPython_std_pair_repr }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)SwigPython_std_pair_len }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)SwigPython_std_pair_getitem }, + { Py_sq_ass_item, (void *)SwigPython_std_pair_setitem }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.types.URational", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet Rational_first_getset = { _wrap_Rational_first_get, _wrap_Rational_first_set }; static SwigPyGetSet Rational___dict___getset = { SwigPyObject_get___dict__, 0 }; @@ -7552,7 +7950,7 @@ SwigPyBuiltin__std__pairT_int32_t_int32_t_t_richcompare(PyObject *self, PyObject result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } return result; @@ -7562,215 +7960,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__std__pairT_int32_t_int32_t_t_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.types.Rational", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ + "exiv2.types.Rational", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ _wrap_delete_Rational_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ + (cmpfunc) 0, /* tp_compare */ #endif - SwigPython_std_pair_repr, /* tp_repr */ - &SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type.as_sequence,/* tp_as_sequence */ + SwigPython_std_pair_repr, /* tp_repr */ + &SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type.as_sequence, /* tp_as_sequence */ &SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type.as_buffer, /* tp_as_buffer */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - "std::pair< int32_t,int32_t >", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__std__pairT_int32_t_int32_t_t_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__std__pairT_int32_t_int32_t_t_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__std__pairT_int32_t_int32_t_t_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_Rational, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "std::pair< int32_t,int32_t >", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__std__pairT_int32_t_int32_t_t_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__std__pairT_int32_t_int32_t_t_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__std__pairT_int32_t_int32_t_t_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_Rational, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - SwigPython_std_pair_len, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - SwigPython_std_pair_getitem, /* sq_item */ + SwigPython_std_pair_len, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + SwigPython_std_pair_getitem, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - SwigPython_std_pair_setitem, /* sq_ass_item */ + SwigPython_std_pair_setitem, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__std__pairT_int32_t_int32_t_t_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type}; +static PyTypeObject *SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Rational'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_Rational }, + { Py_tp_dealloc, (void *)_wrap_delete_Rational_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"std::pair< int32_t,int32_t >" }, + { Py_tp_repr, (void *)SwigPython_std_pair_repr }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__std__pairT_int32_t_int32_t_t_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__std__pairT_int32_t_int32_t_t_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__std__pairT_int32_t_int32_t_t_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)SwigPython_std_pair_len }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)SwigPython_std_pair_getitem }, + { Py_sq_ass_item, (void *)SwigPython_std_pair_setitem }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.types.Rational", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__std__pairT_int32_t_int32_t_t_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -8121,7 +8635,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -8304,7 +8818,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -8351,93 +8865,81 @@ SWIG_init(void) { "\nexiv2.Value.create(). 0x0000 to 0xffff are reserved for TIFF (Exif) types.", _get_enum_list(0, "unsignedByte",Exiv2::unsignedByte,"asciiString",Exiv2::asciiString,"unsignedShort",Exiv2::unsignedShort,"unsignedLong",Exiv2::unsignedLong,"unsignedRational",Exiv2::unsignedRational,"signedByte",Exiv2::signedByte,"undefined",Exiv2::undefined,"signedShort",Exiv2::signedShort,"signedLong",Exiv2::signedLong,"signedRational",Exiv2::signedRational,"tiffFloat",Exiv2::tiffFloat,"tiffDouble",Exiv2::tiffDouble,"tiffIfd",Exiv2::tiffIfd,"string",Exiv2::string,"date",Exiv2::date,"time",Exiv2::time,"comment",Exiv2::comment,"directory",Exiv2::directory,"xmpText",Exiv2::xmpText,"xmpAlt",Exiv2::xmpAlt,"xmpBag",Exiv2::xmpBag,"xmpSeq",Exiv2::xmpSeq,"langAlt",Exiv2::langAlt,"invalidTypeId",Exiv2::invalidTypeId,"lastTypeId",Exiv2::lastTypeId, NULL))); /* type 'Exiv2::TypeInfo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__TypeInfo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'TypeInfo'."); + builtin_pytype = SwigPyBuiltin__Exiv2__TypeInfo_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__TypeInfo_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "TypeInfo", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "TypeInfo"); d = md; /* type 'Exiv2::DataBuf' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__DataBuf_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'DataBuf'."); + builtin_pytype = SwigPyBuiltin__Exiv2__DataBuf_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__DataBuf_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "DataBuf", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "DataBuf"); d = md; /* type 'std::pair< uint32_t,uint32_t >' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'URational'."); + builtin_pytype = SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__std__pairT_uint32_t_uint32_t_t_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "URational", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "URational"); d = md; /* type 'std::pair< int32_t,int32_t >' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'Rational'."); + builtin_pytype = SwigPyBuiltin__std__pairT_int32_t_int32_t_t_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__std__pairT_int32_t_int32_t_t_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "Rational", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "Rational"); d = md; diff --git a/src/swig-0_28_3/value.py b/src/swig-0_28_3/value.py index d2149e27..cac5373a 100644 --- a/src/swig-0_28_3/value.py +++ b/src/swig-0_28_3/value.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_28_3/value_wrap.cxx b/src/swig-0_28_3/value_wrap.cxx index 66cc558b..d5affb80 100644 --- a/src/swig-0_28_3/value_wrap.cxx +++ b/src/swig-0_28_3/value_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_value" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -4006,7 +4058,6 @@ static swig_module_info swig_module = {swig_types, 49, 0, 0, 0, 0}; # define SWIG_init init_value #endif -#define SWIG_name "_value" #ifdef __cplusplus #include @@ -4076,7 +4127,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4084,7 +4135,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4092,8 +4143,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4102,7 +4153,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4125,7 +4176,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4139,11 +4190,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4320,12 +4369,7 @@ namespace swig { } static swig_type_info* descriptor() { - static int init = 0; - static swig_type_info* desc = 0; - if (!init) { - desc = SWIG_TypeQuery("swig::SwigPyIterator *"); - init = 1; - } + static swig_type_info* desc = SWIG_TypeQuery("swig::SwigPyIterator *"); return desc; } }; @@ -4333,7 +4377,7 @@ namespace swig { #if defined(SWIGPYTHON_BUILTIN) inline PyObject* make_output_iterator_builtin (PyObject *pyself) { - Py_INCREF(pyself); + SWIG_Py_INCREF(pyself); return pyself; } #endif @@ -4462,7 +4506,7 @@ static void _set_python_exception() { Py_DECREF(args); } - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -5138,7 +5182,7 @@ namespace swig { template <> struct traits_from { typedef PyObject * value_type; static PyObject *from(const value_type& val) { - Py_XINCREF(val); + SWIG_Py_XINCREF(val); return val; } }; @@ -5649,7 +5693,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -5672,10 +5716,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -5710,12 +5754,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -6098,7 +6138,7 @@ SwigPython_std_pair_repr (PyObject *o) PyTuple_SET_ITEM(tuple, 0, PyObject_GetAttrString(o, (char*) "first")); PyTuple_SET_ITEM(tuple, 1, PyObject_GetAttrString(o, (char*) "second")); PyObject *result = PyObject_Repr(tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -7760,7 +7800,7 @@ SWIGINTERN PyObject *_wrap_Value_read__SWIG_0(PyObject *self, PyObject *args) { } { try { - result = (int)(arg1)->read((Exiv2::byte const *)arg2,arg3,arg4); + result = (int)(arg1)->read((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3),arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -7803,7 +7843,7 @@ SWIGINTERN PyObject *_wrap_Value_read__SWIG_1(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Value_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Value_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Value_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -7896,7 +7936,7 @@ SWIGINTERN PyObject *_wrap_Value_setDataArea(PyObject *self, PyObject *args) { } { try { - result = (int)(arg1)->setDataArea((Exiv2::byte const *)arg2,arg3); + result = (int)(arg1)->setDataArea((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3)); } catch(std::exception const& e) { _set_python_exception(); @@ -8198,7 +8238,7 @@ SWIGINTERN PyObject *_wrap_Value_toString__SWIG_1(PyObject *self, PyObject *args arg2 = static_cast< size_t >(val2); { try { - result = ((Exiv2::Value const *)arg1)->toString(arg2); + result = ((Exiv2::Value const *)arg1)->toString(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -8276,7 +8316,7 @@ SWIGINTERN PyObject *_wrap_Value_toInt64(PyObject *self, PyObject *args) { } { try { - result = (int64_t)((Exiv2::Value const *)arg1)->toInt64(arg2); + result = (int64_t)((Exiv2::Value const *)arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -8319,7 +8359,7 @@ SWIGINTERN PyObject *_wrap_Value_toUint32(PyObject *self, PyObject *args) { } { try { - result = (uint32_t)((Exiv2::Value const *)arg1)->toUint32(arg2); + result = (uint32_t)((Exiv2::Value const *)arg1)->toUint32(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -8362,7 +8402,7 @@ SWIGINTERN PyObject *_wrap_Value_toFloat(PyObject *self, PyObject *args) { } { try { - result = (float)((Exiv2::Value const *)arg1)->toFloat(arg2); + result = (float)((Exiv2::Value const *)arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -8405,7 +8445,7 @@ SWIGINTERN PyObject *_wrap_Value_toRational(PyObject *self, PyObject *args) { } { try { - result = ((Exiv2::Value const *)arg1)->toRational(arg2); + result = ((Exiv2::Value const *)arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -8689,7 +8729,7 @@ SWIGINTERN int _wrap_new_DataValue__SWIG_1(PyObject *self, PyObject *args, PyObj } { try { - result = (Exiv2::DataValue *)new Exiv2::DataValue((Exiv2::byte const *)arg1,arg2,arg3,arg4); + result = (Exiv2::DataValue *)new Exiv2::DataValue((Exiv2::byte const *)arg1,SWIG_STD_MOVE(arg2),arg3,arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -8759,7 +8799,7 @@ SWIGINTERN PyObject *_wrap_DataValue_read__SWIG_0(PyObject *self, PyObject *args } { try { - result = (int)(arg1)->read((Exiv2::byte const *)arg2,arg3,arg4); + result = (int)(arg1)->read((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3),arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -8802,7 +8842,7 @@ SWIGINTERN PyObject *_wrap_DataValue_read__SWIG_1(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DataValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "DataValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9086,7 +9126,7 @@ SWIGINTERN PyObject *_wrap_DataValue_toString(PyObject *self, PyObject *args) { arg2 = static_cast< size_t >(val2); { try { - result = ((Exiv2::DataValue const *)arg1)->toString(arg2); + result = ((Exiv2::DataValue const *)arg1)->toString(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -9129,7 +9169,7 @@ SWIGINTERN PyObject *_wrap_DataValue_toInt64(PyObject *self, PyObject *args) { } { try { - result = (int64_t)((Exiv2::DataValue const *)arg1)->toInt64(arg2); + result = (int64_t)((Exiv2::DataValue const *)arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -9172,7 +9212,7 @@ SWIGINTERN PyObject *_wrap_DataValue_toUint32(PyObject *self, PyObject *args) { } { try { - result = (uint32_t)((Exiv2::DataValue const *)arg1)->toUint32(arg2); + result = (uint32_t)((Exiv2::DataValue const *)arg1)->toUint32(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -9215,7 +9255,7 @@ SWIGINTERN PyObject *_wrap_DataValue_toFloat(PyObject *self, PyObject *args) { } { try { - result = (float)((Exiv2::DataValue const *)arg1)->toFloat(arg2); + result = (float)((Exiv2::DataValue const *)arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -9258,7 +9298,7 @@ SWIGINTERN PyObject *_wrap_DataValue_toRational(PyObject *self, PyObject *args) } { try { - result = ((Exiv2::DataValue const *)arg1)->toRational(arg2); + result = ((Exiv2::DataValue const *)arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -9287,7 +9327,7 @@ SWIGINTERN int _wrap_new_DataValue__SWIG_2(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DataValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DataValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_DataValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -9408,7 +9448,7 @@ SWIGINTERN PyObject *_wrap_StringValueBase_read__SWIG_0(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringValueBase_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringValueBase_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "StringValueBase_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9480,7 +9520,7 @@ SWIGINTERN PyObject *_wrap_StringValueBase_read__SWIG_1(PyObject *self, PyObject } { try { - result = (int)(arg1)->read((Exiv2::byte const *)arg2,arg3,arg4); + result = (int)(arg1)->read((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3),arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -9722,7 +9762,7 @@ SWIGINTERN PyObject *_wrap_StringValueBase_toInt64(PyObject *self, PyObject *arg } { try { - result = (int64_t)((Exiv2::StringValueBase const *)arg1)->toInt64(arg2); + result = (int64_t)((Exiv2::StringValueBase const *)arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -9765,7 +9805,7 @@ SWIGINTERN PyObject *_wrap_StringValueBase_toUint32(PyObject *self, PyObject *ar } { try { - result = (uint32_t)((Exiv2::StringValueBase const *)arg1)->toUint32(arg2); + result = (uint32_t)((Exiv2::StringValueBase const *)arg1)->toUint32(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -9808,7 +9848,7 @@ SWIGINTERN PyObject *_wrap_StringValueBase_toFloat(PyObject *self, PyObject *arg } { try { - result = (float)((Exiv2::StringValueBase const *)arg1)->toFloat(arg2); + result = (float)((Exiv2::StringValueBase const *)arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -9851,7 +9891,7 @@ SWIGINTERN PyObject *_wrap_StringValueBase_toRational(PyObject *self, PyObject * } { try { - result = ((Exiv2::StringValueBase const *)arg1)->toRational(arg2); + result = ((Exiv2::StringValueBase const *)arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -10011,7 +10051,7 @@ SWIGINTERN int _wrap_new_StringValue__SWIG_1(PyObject *self, PyObject *args, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StringValue" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringValue" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_StringValue" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -10079,7 +10119,7 @@ SWIGINTERN int _wrap_new_StringValue__SWIG_2(PyObject *self, PyObject *args, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StringValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_StringValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -10238,7 +10278,7 @@ SWIGINTERN PyObject *_wrap_AsciiValue_read__SWIG_0(PyObject *self, PyObject *arg } { try { - result = (int)(arg1)->read((Exiv2::byte const *)arg2,arg3,arg4); + result = (int)(arg1)->read((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3),arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -10281,7 +10321,7 @@ SWIGINTERN PyObject *_wrap_AsciiValue_read__SWIG_1(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AsciiValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AsciiValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "AsciiValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -10436,7 +10476,7 @@ SWIGINTERN int _wrap_new_AsciiValue__SWIG_1(PyObject *self, PyObject *args, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AsciiValue" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AsciiValue" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_AsciiValue" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -10473,7 +10513,7 @@ SWIGINTERN int _wrap_new_AsciiValue__SWIG_2(PyObject *self, PyObject *args, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AsciiValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AsciiValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_AsciiValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -10598,7 +10638,7 @@ SWIGINTERN int _wrap_new_CommentValue__SWIG_1(PyObject *self, PyObject *args, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CommentValue" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CommentValue" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_CommentValue" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -10643,7 +10683,7 @@ SWIGINTERN PyObject *_wrap_CommentValue_read__SWIG_0(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CommentValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CommentValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "CommentValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -10715,7 +10755,7 @@ SWIGINTERN PyObject *_wrap_CommentValue_read__SWIG_1(PyObject *self, PyObject *a } { try { - result = (int)(arg1)->read((Exiv2::byte const *)arg2,arg3,arg4); + result = (int)(arg1)->read((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3),arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -11059,7 +11099,7 @@ SWIGINTERN PyObject *_wrap_CommentValue_detectCharset(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CommentValue_detectCharset" "', argument " "2"" of type '" "std::string &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CommentValue_detectCharset" "', argument " "2"" of type '" "std::string &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "CommentValue_detectCharset" "', argument " "2"" of type '" "std::string &""'"); } arg2 = ptr; } @@ -11189,7 +11229,7 @@ SWIGINTERN int _wrap_new_CommentValue__SWIG_2(PyObject *self, PyObject *args, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CommentValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CommentValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_CommentValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -11601,7 +11641,7 @@ SWIGINTERN PyObject *_wrap_XmpValue_read__SWIG_0(PyObject *self, PyObject *args) } { try { - result = (int)(arg1)->read((Exiv2::byte const *)arg2,arg3,arg4); + result = (int)(arg1)->read((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3),arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -11644,7 +11684,7 @@ SWIGINTERN PyObject *_wrap_XmpValue_read__SWIG_1(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -11745,7 +11785,7 @@ SWIGINTERN int _wrap_new_XmpTextValue__SWIG_1(PyObject *self, PyObject *args, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XmpTextValue" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XmpTextValue" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_XmpTextValue" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -11817,7 +11857,7 @@ SWIGINTERN PyObject *_wrap_XmpTextValue_read__SWIG_0(PyObject *self, PyObject *a } { try { - result = (int)(arg1)->read((Exiv2::byte const *)arg2,arg3,arg4); + result = (int)(arg1)->read((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3),arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -11860,7 +11900,7 @@ SWIGINTERN PyObject *_wrap_XmpTextValue_read__SWIG_1(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpTextValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpTextValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpTextValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -12025,7 +12065,7 @@ SWIGINTERN PyObject *_wrap_XmpTextValue_toInt64(PyObject *self, PyObject *args) } { try { - result = (int64_t)((Exiv2::XmpTextValue const *)arg1)->toInt64(arg2); + result = (int64_t)((Exiv2::XmpTextValue const *)arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -12068,7 +12108,7 @@ SWIGINTERN PyObject *_wrap_XmpTextValue_toUint32(PyObject *self, PyObject *args) } { try { - result = (uint32_t)((Exiv2::XmpTextValue const *)arg1)->toUint32(arg2); + result = (uint32_t)((Exiv2::XmpTextValue const *)arg1)->toUint32(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -12111,7 +12151,7 @@ SWIGINTERN PyObject *_wrap_XmpTextValue_toFloat(PyObject *self, PyObject *args) } { try { - result = (float)((Exiv2::XmpTextValue const *)arg1)->toFloat(arg2); + result = (float)((Exiv2::XmpTextValue const *)arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -12154,7 +12194,7 @@ SWIGINTERN PyObject *_wrap_XmpTextValue_toRational(PyObject *self, PyObject *arg } { try { - result = ((Exiv2::XmpTextValue const *)arg1)->toRational(arg2); + result = ((Exiv2::XmpTextValue const *)arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -12228,7 +12268,7 @@ SWIGINTERN int _wrap_new_XmpTextValue__SWIG_2(PyObject *self, PyObject *args, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XmpTextValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XmpTextValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_XmpTextValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -12428,7 +12468,7 @@ SWIGINTERN PyObject *_wrap_XmpArrayValue_read__SWIG_0(PyObject *self, PyObject * } { try { - result = (int)(arg1)->read((Exiv2::byte const *)arg2,arg3,arg4); + result = (int)(arg1)->read((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3),arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -12471,7 +12511,7 @@ SWIGINTERN PyObject *_wrap_XmpArrayValue_read__SWIG_1(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpArrayValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpArrayValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpArrayValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -12610,7 +12650,7 @@ SWIGINTERN PyObject *_wrap_XmpArrayValue_toString(PyObject *self, PyObject *args arg2 = static_cast< size_t >(val2); { try { - result = ((Exiv2::XmpArrayValue const *)arg1)->toString(arg2); + result = ((Exiv2::XmpArrayValue const *)arg1)->toString(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -12653,7 +12693,7 @@ SWIGINTERN PyObject *_wrap_XmpArrayValue_toInt64(PyObject *self, PyObject *args) } { try { - result = (int64_t)((Exiv2::XmpArrayValue const *)arg1)->toInt64(arg2); + result = (int64_t)((Exiv2::XmpArrayValue const *)arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -12696,7 +12736,7 @@ SWIGINTERN PyObject *_wrap_XmpArrayValue_toUint32(PyObject *self, PyObject *args } { try { - result = (uint32_t)((Exiv2::XmpArrayValue const *)arg1)->toUint32(arg2); + result = (uint32_t)((Exiv2::XmpArrayValue const *)arg1)->toUint32(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -12739,7 +12779,7 @@ SWIGINTERN PyObject *_wrap_XmpArrayValue_toFloat(PyObject *self, PyObject *args) } { try { - result = (float)((Exiv2::XmpArrayValue const *)arg1)->toFloat(arg2); + result = (float)((Exiv2::XmpArrayValue const *)arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -12782,7 +12822,7 @@ SWIGINTERN PyObject *_wrap_XmpArrayValue_toRational(PyObject *self, PyObject *ar } { try { - result = ((Exiv2::XmpArrayValue const *)arg1)->toRational(arg2); + result = ((Exiv2::XmpArrayValue const *)arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -12856,7 +12896,7 @@ SWIGINTERN int _wrap_new_XmpArrayValue__SWIG_0(PyObject *self, PyObject *args, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XmpArrayValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XmpArrayValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_XmpArrayValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -13156,7 +13196,7 @@ SWIGINTERN int _wrap_new_LangAltValue__SWIG_1(PyObject *self, PyObject *args, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LangAltValue" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LangAltValue" "', argument " "1"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_LangAltValue" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } @@ -13228,7 +13268,7 @@ SWIGINTERN PyObject *_wrap_LangAltValue_read__SWIG_0(PyObject *self, PyObject *a } { try { - result = (int)(arg1)->read((Exiv2::byte const *)arg2,arg3,arg4); + result = (int)(arg1)->read((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3),arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -13271,7 +13311,7 @@ SWIGINTERN PyObject *_wrap_LangAltValue_read__SWIG_1(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LangAltValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LangAltValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "LangAltValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -13410,7 +13450,7 @@ SWIGINTERN PyObject *_wrap_LangAltValue_toString__SWIG_0(PyObject *self, PyObjec arg2 = static_cast< size_t >(val2); { try { - result = ((Exiv2::LangAltValue const *)arg1)->toString(arg2); + result = ((Exiv2::LangAltValue const *)arg1)->toString(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -13447,7 +13487,7 @@ SWIGINTERN PyObject *_wrap_LangAltValue_toString__SWIG_1(PyObject *self, PyObjec SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LangAltValue_toString" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LangAltValue_toString" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "LangAltValue_toString" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -13541,7 +13581,7 @@ SWIGINTERN PyObject *_wrap_LangAltValue_toInt64(PyObject *self, PyObject *args) } { try { - result = (int64_t)((Exiv2::LangAltValue const *)arg1)->toInt64(arg2); + result = (int64_t)((Exiv2::LangAltValue const *)arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -13584,7 +13624,7 @@ SWIGINTERN PyObject *_wrap_LangAltValue_toUint32(PyObject *self, PyObject *args) } { try { - result = (uint32_t)((Exiv2::LangAltValue const *)arg1)->toUint32(arg2); + result = (uint32_t)((Exiv2::LangAltValue const *)arg1)->toUint32(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -13627,7 +13667,7 @@ SWIGINTERN PyObject *_wrap_LangAltValue_toFloat(PyObject *self, PyObject *args) } { try { - result = (float)((Exiv2::LangAltValue const *)arg1)->toFloat(arg2); + result = (float)((Exiv2::LangAltValue const *)arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -13670,7 +13710,7 @@ SWIGINTERN PyObject *_wrap_LangAltValue_toRational(PyObject *self, PyObject *arg } { try { - result = ((Exiv2::LangAltValue const *)arg1)->toRational(arg2); + result = ((Exiv2::LangAltValue const *)arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -13869,7 +13909,7 @@ SWIGINTERN PyObject *_wrap_LangAltValue___getitem__(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LangAltValue___getitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LangAltValue___getitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "LangAltValue___getitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -13912,7 +13952,7 @@ SWIGINTERN PyObject *_wrap_LangAltValue___setitem__(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LangAltValue___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LangAltValue___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "LangAltValue___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -13958,7 +13998,7 @@ SWIGINTERN PyObject *_wrap_LangAltValue___contains__(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LangAltValue___contains__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LangAltValue___contains__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "LangAltValue___contains__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -13987,7 +14027,7 @@ SWIGINTERN int _wrap_new_LangAltValue__SWIG_3(PyObject *self, PyObject *args, Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LangAltValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LangAltValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_LangAltValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -14217,7 +14257,7 @@ SWIGINTERN PyObject *_wrap_DateValue_read__SWIG_0(PyObject *self, PyObject *args } { try { - result = (int)(arg1)->read((Exiv2::byte const *)arg2,arg3,arg4); + result = (int)(arg1)->read((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3),arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -14260,7 +14300,7 @@ SWIGINTERN PyObject *_wrap_DateValue_read__SWIG_1(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DateValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DateValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "DateValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -14344,7 +14384,7 @@ SWIGINTERN PyObject *_wrap_DateValue_setDate__SWIG_0(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DateValue_setDate" "', argument " "2"" of type '" "Exiv2::DateValue::Date const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DateValue_setDate" "', argument " "2"" of type '" "Exiv2::DateValue::Date const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "DateValue_setDate" "', argument " "2"" of type '" "Exiv2::DateValue::Date const &""'"); } arg2 = reinterpret_cast< Exiv2::DateValue::Date * >(argp2); { @@ -14618,7 +14658,7 @@ SWIGINTERN PyObject *_wrap_DateValue_toInt64(PyObject *self, PyObject *args) { } { try { - result = (int64_t)((Exiv2::DateValue const *)arg1)->toInt64(arg2); + result = (int64_t)((Exiv2::DateValue const *)arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -14661,7 +14701,7 @@ SWIGINTERN PyObject *_wrap_DateValue_toUint32(PyObject *self, PyObject *args) { } { try { - result = (uint32_t)((Exiv2::DateValue const *)arg1)->toUint32(arg2); + result = (uint32_t)((Exiv2::DateValue const *)arg1)->toUint32(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -14704,7 +14744,7 @@ SWIGINTERN PyObject *_wrap_DateValue_toFloat(PyObject *self, PyObject *args) { } { try { - result = (float)((Exiv2::DateValue const *)arg1)->toFloat(arg2); + result = (float)((Exiv2::DateValue const *)arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -14747,7 +14787,7 @@ SWIGINTERN PyObject *_wrap_DateValue_toRational(PyObject *self, PyObject *args) } { try { - result = ((Exiv2::DateValue const *)arg1)->toRational(arg2); + result = ((Exiv2::DateValue const *)arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -14776,7 +14816,7 @@ SWIGINTERN int _wrap_new_DateValue__SWIG_2(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DateValue" "', argument " "1"" of type '" "Exiv2::DateValue::Date &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DateValue" "', argument " "1"" of type '" "Exiv2::DateValue::Date &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_DateValue" "', argument " "1"" of type '" "Exiv2::DateValue::Date &""'"); } arg1 = reinterpret_cast< Exiv2::DateValue::Date * >(argp1); { @@ -14900,7 +14940,7 @@ SWIGINTERN int _wrap_new_DateValue__SWIG_3(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DateValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DateValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_DateValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -15343,7 +15383,7 @@ SWIGINTERN PyObject *_wrap_Date___getitem__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Date___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Date___getitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Date___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -15397,7 +15437,7 @@ SWIGINTERN PyObject *_wrap_Date___setitem__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Date___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Date___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Date___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -15634,7 +15674,7 @@ SWIGINTERN PyObject *_wrap_TimeValue_read__SWIG_0(PyObject *self, PyObject *args } { try { - result = (int)(arg1)->read((Exiv2::byte const *)arg2,arg3,arg4); + result = (int)(arg1)->read((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3),arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -15677,7 +15717,7 @@ SWIGINTERN PyObject *_wrap_TimeValue_read__SWIG_1(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TimeValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TimeValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "TimeValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -15761,7 +15801,7 @@ SWIGINTERN PyObject *_wrap_TimeValue_setTime__SWIG_0(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TimeValue_setTime" "', argument " "2"" of type '" "Exiv2::TimeValue::Time const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TimeValue_setTime" "', argument " "2"" of type '" "Exiv2::TimeValue::Time const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "TimeValue_setTime" "', argument " "2"" of type '" "Exiv2::TimeValue::Time const &""'"); } arg2 = reinterpret_cast< Exiv2::TimeValue::Time * >(argp2); { @@ -16035,7 +16075,7 @@ SWIGINTERN PyObject *_wrap_TimeValue_toInt64(PyObject *self, PyObject *args) { } { try { - result = (int64_t)((Exiv2::TimeValue const *)arg1)->toInt64(arg2); + result = (int64_t)((Exiv2::TimeValue const *)arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -16078,7 +16118,7 @@ SWIGINTERN PyObject *_wrap_TimeValue_toUint32(PyObject *self, PyObject *args) { } { try { - result = (uint32_t)((Exiv2::TimeValue const *)arg1)->toUint32(arg2); + result = (uint32_t)((Exiv2::TimeValue const *)arg1)->toUint32(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -16121,7 +16161,7 @@ SWIGINTERN PyObject *_wrap_TimeValue_toFloat(PyObject *self, PyObject *args) { } { try { - result = (float)((Exiv2::TimeValue const *)arg1)->toFloat(arg2); + result = (float)((Exiv2::TimeValue const *)arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -16164,7 +16204,7 @@ SWIGINTERN PyObject *_wrap_TimeValue_toRational(PyObject *self, PyObject *args) } { try { - result = ((Exiv2::TimeValue const *)arg1)->toRational(arg2); + result = ((Exiv2::TimeValue const *)arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -16193,7 +16233,7 @@ SWIGINTERN int _wrap_new_TimeValue__SWIG_2(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TimeValue" "', argument " "1"" of type '" "Exiv2::TimeValue::Time &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TimeValue" "', argument " "1"" of type '" "Exiv2::TimeValue::Time &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_TimeValue" "', argument " "1"" of type '" "Exiv2::TimeValue::Time &""'"); } arg1 = reinterpret_cast< Exiv2::TimeValue::Time * >(argp1); { @@ -16350,7 +16390,7 @@ SWIGINTERN int _wrap_new_TimeValue__SWIG_3(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TimeValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TimeValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_TimeValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -16908,7 +16948,7 @@ SWIGINTERN PyObject *_wrap_Time___getitem__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Time___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Time___getitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Time___getitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -16962,7 +17002,7 @@ SWIGINTERN PyObject *_wrap_Time___setitem__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Time___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Time___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Time___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -17125,7 +17165,7 @@ SWIGINTERN int _wrap_new_UShortValue__SWIG_1(PyObject *self, PyObject *args, PyO } { try { - result = (Exiv2::ValueType< uint16_t > *)new Exiv2::ValueType< uint16_t >((Exiv2::byte const *)arg1,arg2,arg3,arg4); + result = (Exiv2::ValueType< uint16_t > *)new Exiv2::ValueType< uint16_t >((Exiv2::byte const *)arg1,SWIG_STD_MOVE(arg2),arg3,arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -17213,7 +17253,7 @@ SWIGINTERN int _wrap_new_UShortValue__SWIG_3(PyObject *self, PyObject *args, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UShortValue" "', argument " "1"" of type '" "Exiv2::ValueType< unsigned short > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UShortValue" "', argument " "1"" of type '" "Exiv2::ValueType< unsigned short > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_UShortValue" "', argument " "1"" of type '" "Exiv2::ValueType< unsigned short > const &""'"); } arg1 = reinterpret_cast< Exiv2::ValueType< unsigned short > * >(argp1); { @@ -17305,7 +17345,7 @@ SWIGINTERN PyObject *_wrap_UShortValue_read__SWIG_0(PyObject *self, PyObject *ar } { try { - result = (int)(arg1)->read((Exiv2::byte const *)arg2,arg3,arg4); + result = (int)(arg1)->read((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3),arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -17348,7 +17388,7 @@ SWIGINTERN PyObject *_wrap_UShortValue_read__SWIG_1(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UShortValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UShortValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "UShortValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -17435,7 +17475,7 @@ SWIGINTERN PyObject *_wrap_UShortValue_setDataArea(PyObject *self, PyObject *arg } { try { - result = (int)(arg1)->setDataArea((Exiv2::byte const *)arg2,arg3); + result = (int)(arg1)->setDataArea((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3)); } catch(std::exception const& e) { _set_python_exception(); @@ -17671,7 +17711,7 @@ SWIGINTERN PyObject *_wrap_UShortValue_toString(PyObject *self, PyObject *args) arg2 = static_cast< size_t >(val2); { try { - result = ((Exiv2::ValueType< uint16_t > const *)arg1)->toString(arg2); + result = ((Exiv2::ValueType< uint16_t > const *)arg1)->toString(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -17714,7 +17754,7 @@ SWIGINTERN PyObject *_wrap_UShortValue_toInt64(PyObject *self, PyObject *args) { } { try { - result = (int64_t)((Exiv2::ValueType< uint16_t > const *)arg1)->toInt64(arg2); + result = (int64_t)((Exiv2::ValueType< uint16_t > const *)arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -17757,7 +17797,7 @@ SWIGINTERN PyObject *_wrap_UShortValue_toUint32(PyObject *self, PyObject *args) } { try { - result = (uint32_t)((Exiv2::ValueType< uint16_t > const *)arg1)->toUint32(arg2); + result = (uint32_t)((Exiv2::ValueType< uint16_t > const *)arg1)->toUint32(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -17800,7 +17840,7 @@ SWIGINTERN PyObject *_wrap_UShortValue_toFloat(PyObject *self, PyObject *args) { } { try { - result = (float)((Exiv2::ValueType< uint16_t > const *)arg1)->toFloat(arg2); + result = (float)((Exiv2::ValueType< uint16_t > const *)arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -17843,7 +17883,7 @@ SWIGINTERN PyObject *_wrap_UShortValue_toRational(PyObject *self, PyObject *args } { try { - result = ((Exiv2::ValueType< uint16_t > const *)arg1)->toRational(arg2); + result = ((Exiv2::ValueType< uint16_t > const *)arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -17933,7 +17973,7 @@ SWIGINTERN int _wrap_new_UShortValue__SWIG_4(PyObject *self, PyObject *args, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UShortValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UShortValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_UShortValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -18131,7 +18171,7 @@ SWIGINTERN PyObject *_wrap_UShortValue___setitem__(PyObject *self, PyObject *arg arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_unsigned_short,0))))) { - unsigned short val; + unsigned short val; int ecode = SWIG_AsVal_unsigned_SS_short(obj2, &val); if (!SWIG_IsOK(ecode)) { SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "UShortValue___setitem__" "', argument " "3"" of type '" "uint16_t""'"); @@ -18274,7 +18314,7 @@ SWIGINTERN int _wrap_new_ULongValue__SWIG_1(PyObject *self, PyObject *args, PyOb } { try { - result = (Exiv2::ValueType< uint32_t > *)new Exiv2::ValueType< uint32_t >((Exiv2::byte const *)arg1,arg2,arg3,arg4); + result = (Exiv2::ValueType< uint32_t > *)new Exiv2::ValueType< uint32_t >((Exiv2::byte const *)arg1,SWIG_STD_MOVE(arg2),arg3,arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -18362,7 +18402,7 @@ SWIGINTERN int _wrap_new_ULongValue__SWIG_3(PyObject *self, PyObject *args, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ULongValue" "', argument " "1"" of type '" "Exiv2::ValueType< unsigned int > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ULongValue" "', argument " "1"" of type '" "Exiv2::ValueType< unsigned int > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_ULongValue" "', argument " "1"" of type '" "Exiv2::ValueType< unsigned int > const &""'"); } arg1 = reinterpret_cast< Exiv2::ValueType< unsigned int > * >(argp1); { @@ -18454,7 +18494,7 @@ SWIGINTERN PyObject *_wrap_ULongValue_read__SWIG_0(PyObject *self, PyObject *arg } { try { - result = (int)(arg1)->read((Exiv2::byte const *)arg2,arg3,arg4); + result = (int)(arg1)->read((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3),arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -18497,7 +18537,7 @@ SWIGINTERN PyObject *_wrap_ULongValue_read__SWIG_1(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ULongValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ULongValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ULongValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -18584,7 +18624,7 @@ SWIGINTERN PyObject *_wrap_ULongValue_setDataArea(PyObject *self, PyObject *args } { try { - result = (int)(arg1)->setDataArea((Exiv2::byte const *)arg2,arg3); + result = (int)(arg1)->setDataArea((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3)); } catch(std::exception const& e) { _set_python_exception(); @@ -18820,7 +18860,7 @@ SWIGINTERN PyObject *_wrap_ULongValue_toString(PyObject *self, PyObject *args) { arg2 = static_cast< size_t >(val2); { try { - result = ((Exiv2::ValueType< uint32_t > const *)arg1)->toString(arg2); + result = ((Exiv2::ValueType< uint32_t > const *)arg1)->toString(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -18863,7 +18903,7 @@ SWIGINTERN PyObject *_wrap_ULongValue_toInt64(PyObject *self, PyObject *args) { } { try { - result = (int64_t)((Exiv2::ValueType< uint32_t > const *)arg1)->toInt64(arg2); + result = (int64_t)((Exiv2::ValueType< uint32_t > const *)arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -18906,7 +18946,7 @@ SWIGINTERN PyObject *_wrap_ULongValue_toUint32(PyObject *self, PyObject *args) { } { try { - result = (uint32_t)((Exiv2::ValueType< uint32_t > const *)arg1)->toUint32(arg2); + result = (uint32_t)((Exiv2::ValueType< uint32_t > const *)arg1)->toUint32(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -18949,7 +18989,7 @@ SWIGINTERN PyObject *_wrap_ULongValue_toFloat(PyObject *self, PyObject *args) { } { try { - result = (float)((Exiv2::ValueType< uint32_t > const *)arg1)->toFloat(arg2); + result = (float)((Exiv2::ValueType< uint32_t > const *)arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -18992,7 +19032,7 @@ SWIGINTERN PyObject *_wrap_ULongValue_toRational(PyObject *self, PyObject *args) } { try { - result = ((Exiv2::ValueType< uint32_t > const *)arg1)->toRational(arg2); + result = ((Exiv2::ValueType< uint32_t > const *)arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -19082,7 +19122,7 @@ SWIGINTERN int _wrap_new_ULongValue__SWIG_4(PyObject *self, PyObject *args, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ULongValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ULongValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_ULongValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -19280,7 +19320,7 @@ SWIGINTERN PyObject *_wrap_ULongValue___setitem__(PyObject *self, PyObject *args arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_unsigned_int,0))))) { - unsigned int val; + unsigned int val; int ecode = SWIG_AsVal_unsigned_SS_int(obj2, &val); if (!SWIG_IsOK(ecode)) { SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "ULongValue___setitem__" "', argument " "3"" of type '" "uint32_t""'"); @@ -19423,7 +19463,7 @@ SWIGINTERN int _wrap_new_URationalValue__SWIG_1(PyObject *self, PyObject *args, } { try { - result = (Exiv2::ValueType< Exiv2::URational > *)new Exiv2::ValueType< Exiv2::URational >((Exiv2::byte const *)arg1,arg2,arg3,arg4); + result = (Exiv2::ValueType< Exiv2::URational > *)new Exiv2::ValueType< Exiv2::URational >((Exiv2::byte const *)arg1,SWIG_STD_MOVE(arg2),arg3,arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -19464,7 +19504,7 @@ SWIGINTERN int _wrap_new_URationalValue__SWIG_2(PyObject *self, PyObject *args, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_URationalValue" "', argument " "1"" of type '" "std::pair< unsigned int,unsigned int > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_URationalValue" "', argument " "1"" of type '" "std::pair< unsigned int,unsigned int > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_URationalValue" "', argument " "1"" of type '" "std::pair< unsigned int,unsigned int > const &""'"); } arg1 = ptr; } @@ -19516,7 +19556,7 @@ SWIGINTERN int _wrap_new_URationalValue__SWIG_3(PyObject *self, PyObject *args, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_URationalValue" "', argument " "1"" of type '" "Exiv2::ValueType< std::pair< unsigned int,unsigned int > > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_URationalValue" "', argument " "1"" of type '" "Exiv2::ValueType< std::pair< unsigned int,unsigned int > > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_URationalValue" "', argument " "1"" of type '" "Exiv2::ValueType< std::pair< unsigned int,unsigned int > > const &""'"); } arg1 = reinterpret_cast< Exiv2::ValueType< std::pair< unsigned int,unsigned int > > * >(argp1); { @@ -19608,7 +19648,7 @@ SWIGINTERN PyObject *_wrap_URationalValue_read__SWIG_0(PyObject *self, PyObject } { try { - result = (int)(arg1)->read((Exiv2::byte const *)arg2,arg3,arg4); + result = (int)(arg1)->read((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3),arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -19651,7 +19691,7 @@ SWIGINTERN PyObject *_wrap_URationalValue_read__SWIG_1(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "URationalValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "URationalValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "URationalValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -19738,7 +19778,7 @@ SWIGINTERN PyObject *_wrap_URationalValue_setDataArea(PyObject *self, PyObject * } { try { - result = (int)(arg1)->setDataArea((Exiv2::byte const *)arg2,arg3); + result = (int)(arg1)->setDataArea((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3)); } catch(std::exception const& e) { _set_python_exception(); @@ -19974,7 +20014,7 @@ SWIGINTERN PyObject *_wrap_URationalValue_toString(PyObject *self, PyObject *arg arg2 = static_cast< size_t >(val2); { try { - result = ((Exiv2::ValueType< Exiv2::URational > const *)arg1)->toString(arg2); + result = ((Exiv2::ValueType< Exiv2::URational > const *)arg1)->toString(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -20017,7 +20057,7 @@ SWIGINTERN PyObject *_wrap_URationalValue_toInt64(PyObject *self, PyObject *args } { try { - result = (int64_t)((Exiv2::ValueType< Exiv2::URational > const *)arg1)->toInt64(arg2); + result = (int64_t)((Exiv2::ValueType< Exiv2::URational > const *)arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -20060,7 +20100,7 @@ SWIGINTERN PyObject *_wrap_URationalValue_toUint32(PyObject *self, PyObject *arg } { try { - result = (uint32_t)((Exiv2::ValueType< Exiv2::URational > const *)arg1)->toUint32(arg2); + result = (uint32_t)((Exiv2::ValueType< Exiv2::URational > const *)arg1)->toUint32(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -20103,7 +20143,7 @@ SWIGINTERN PyObject *_wrap_URationalValue_toFloat(PyObject *self, PyObject *args } { try { - result = (float)((Exiv2::ValueType< Exiv2::URational > const *)arg1)->toFloat(arg2); + result = (float)((Exiv2::ValueType< Exiv2::URational > const *)arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -20146,7 +20186,7 @@ SWIGINTERN PyObject *_wrap_URationalValue_toRational(PyObject *self, PyObject *a } { try { - result = ((Exiv2::ValueType< Exiv2::URational > const *)arg1)->toRational(arg2); + result = ((Exiv2::ValueType< Exiv2::URational > const *)arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -20236,7 +20276,7 @@ SWIGINTERN int _wrap_new_URationalValue__SWIG_4(PyObject *self, PyObject *args, SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_URationalValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_URationalValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_URationalValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -20571,7 +20611,7 @@ SWIGINTERN int _wrap_new_ShortValue__SWIG_1(PyObject *self, PyObject *args, PyOb } { try { - result = (Exiv2::ValueType< int16_t > *)new Exiv2::ValueType< int16_t >((Exiv2::byte const *)arg1,arg2,arg3,arg4); + result = (Exiv2::ValueType< int16_t > *)new Exiv2::ValueType< int16_t >((Exiv2::byte const *)arg1,SWIG_STD_MOVE(arg2),arg3,arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -20659,7 +20699,7 @@ SWIGINTERN int _wrap_new_ShortValue__SWIG_3(PyObject *self, PyObject *args, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ShortValue" "', argument " "1"" of type '" "Exiv2::ValueType< short > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ShortValue" "', argument " "1"" of type '" "Exiv2::ValueType< short > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_ShortValue" "', argument " "1"" of type '" "Exiv2::ValueType< short > const &""'"); } arg1 = reinterpret_cast< Exiv2::ValueType< short > * >(argp1); { @@ -20751,7 +20791,7 @@ SWIGINTERN PyObject *_wrap_ShortValue_read__SWIG_0(PyObject *self, PyObject *arg } { try { - result = (int)(arg1)->read((Exiv2::byte const *)arg2,arg3,arg4); + result = (int)(arg1)->read((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3),arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -20794,7 +20834,7 @@ SWIGINTERN PyObject *_wrap_ShortValue_read__SWIG_1(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShortValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "ShortValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -20881,7 +20921,7 @@ SWIGINTERN PyObject *_wrap_ShortValue_setDataArea(PyObject *self, PyObject *args } { try { - result = (int)(arg1)->setDataArea((Exiv2::byte const *)arg2,arg3); + result = (int)(arg1)->setDataArea((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3)); } catch(std::exception const& e) { _set_python_exception(); @@ -21117,7 +21157,7 @@ SWIGINTERN PyObject *_wrap_ShortValue_toString(PyObject *self, PyObject *args) { arg2 = static_cast< size_t >(val2); { try { - result = ((Exiv2::ValueType< int16_t > const *)arg1)->toString(arg2); + result = ((Exiv2::ValueType< int16_t > const *)arg1)->toString(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -21160,7 +21200,7 @@ SWIGINTERN PyObject *_wrap_ShortValue_toInt64(PyObject *self, PyObject *args) { } { try { - result = (int64_t)((Exiv2::ValueType< int16_t > const *)arg1)->toInt64(arg2); + result = (int64_t)((Exiv2::ValueType< int16_t > const *)arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -21203,7 +21243,7 @@ SWIGINTERN PyObject *_wrap_ShortValue_toUint32(PyObject *self, PyObject *args) { } { try { - result = (uint32_t)((Exiv2::ValueType< int16_t > const *)arg1)->toUint32(arg2); + result = (uint32_t)((Exiv2::ValueType< int16_t > const *)arg1)->toUint32(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -21246,7 +21286,7 @@ SWIGINTERN PyObject *_wrap_ShortValue_toFloat(PyObject *self, PyObject *args) { } { try { - result = (float)((Exiv2::ValueType< int16_t > const *)arg1)->toFloat(arg2); + result = (float)((Exiv2::ValueType< int16_t > const *)arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -21289,7 +21329,7 @@ SWIGINTERN PyObject *_wrap_ShortValue_toRational(PyObject *self, PyObject *args) } { try { - result = ((Exiv2::ValueType< int16_t > const *)arg1)->toRational(arg2); + result = ((Exiv2::ValueType< int16_t > const *)arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -21379,7 +21419,7 @@ SWIGINTERN int _wrap_new_ShortValue__SWIG_4(PyObject *self, PyObject *args, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ShortValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ShortValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_ShortValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -21577,7 +21617,7 @@ SWIGINTERN PyObject *_wrap_ShortValue___setitem__(PyObject *self, PyObject *args arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_short,0))))) { - short val; + short val; int ecode = SWIG_AsVal_short(obj2, &val); if (!SWIG_IsOK(ecode)) { SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "ShortValue___setitem__" "', argument " "3"" of type '" "int16_t""'"); @@ -21720,7 +21760,7 @@ SWIGINTERN int _wrap_new_LongValue__SWIG_1(PyObject *self, PyObject *args, PyObj } { try { - result = (Exiv2::ValueType< int32_t > *)new Exiv2::ValueType< int32_t >((Exiv2::byte const *)arg1,arg2,arg3,arg4); + result = (Exiv2::ValueType< int32_t > *)new Exiv2::ValueType< int32_t >((Exiv2::byte const *)arg1,SWIG_STD_MOVE(arg2),arg3,arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -21808,7 +21848,7 @@ SWIGINTERN int _wrap_new_LongValue__SWIG_3(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LongValue" "', argument " "1"" of type '" "Exiv2::ValueType< int > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LongValue" "', argument " "1"" of type '" "Exiv2::ValueType< int > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_LongValue" "', argument " "1"" of type '" "Exiv2::ValueType< int > const &""'"); } arg1 = reinterpret_cast< Exiv2::ValueType< int > * >(argp1); { @@ -21900,7 +21940,7 @@ SWIGINTERN PyObject *_wrap_LongValue_read__SWIG_0(PyObject *self, PyObject *args } { try { - result = (int)(arg1)->read((Exiv2::byte const *)arg2,arg3,arg4); + result = (int)(arg1)->read((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3),arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -21943,7 +21983,7 @@ SWIGINTERN PyObject *_wrap_LongValue_read__SWIG_1(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LongValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LongValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "LongValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -22030,7 +22070,7 @@ SWIGINTERN PyObject *_wrap_LongValue_setDataArea(PyObject *self, PyObject *args) } { try { - result = (int)(arg1)->setDataArea((Exiv2::byte const *)arg2,arg3); + result = (int)(arg1)->setDataArea((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3)); } catch(std::exception const& e) { _set_python_exception(); @@ -22266,7 +22306,7 @@ SWIGINTERN PyObject *_wrap_LongValue_toString(PyObject *self, PyObject *args) { arg2 = static_cast< size_t >(val2); { try { - result = ((Exiv2::ValueType< int32_t > const *)arg1)->toString(arg2); + result = ((Exiv2::ValueType< int32_t > const *)arg1)->toString(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -22309,7 +22349,7 @@ SWIGINTERN PyObject *_wrap_LongValue_toInt64(PyObject *self, PyObject *args) { } { try { - result = (int64_t)((Exiv2::ValueType< int32_t > const *)arg1)->toInt64(arg2); + result = (int64_t)((Exiv2::ValueType< int32_t > const *)arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -22352,7 +22392,7 @@ SWIGINTERN PyObject *_wrap_LongValue_toUint32(PyObject *self, PyObject *args) { } { try { - result = (uint32_t)((Exiv2::ValueType< int32_t > const *)arg1)->toUint32(arg2); + result = (uint32_t)((Exiv2::ValueType< int32_t > const *)arg1)->toUint32(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -22395,7 +22435,7 @@ SWIGINTERN PyObject *_wrap_LongValue_toFloat(PyObject *self, PyObject *args) { } { try { - result = (float)((Exiv2::ValueType< int32_t > const *)arg1)->toFloat(arg2); + result = (float)((Exiv2::ValueType< int32_t > const *)arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -22438,7 +22478,7 @@ SWIGINTERN PyObject *_wrap_LongValue_toRational(PyObject *self, PyObject *args) } { try { - result = ((Exiv2::ValueType< int32_t > const *)arg1)->toRational(arg2); + result = ((Exiv2::ValueType< int32_t > const *)arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -22528,7 +22568,7 @@ SWIGINTERN int _wrap_new_LongValue__SWIG_4(PyObject *self, PyObject *args, PyObj SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LongValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LongValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_LongValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -22726,7 +22766,7 @@ SWIGINTERN PyObject *_wrap_LongValue___setitem__(PyObject *self, PyObject *args) arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_int,0))))) { - int val; + int val; int ecode = SWIG_AsVal_int(obj2, &val); if (!SWIG_IsOK(ecode)) { SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "LongValue___setitem__" "', argument " "3"" of type '" "int32_t""'"); @@ -22869,7 +22909,7 @@ SWIGINTERN int _wrap_new_RationalValue__SWIG_1(PyObject *self, PyObject *args, P } { try { - result = (Exiv2::ValueType< Exiv2::Rational > *)new Exiv2::ValueType< Exiv2::Rational >((Exiv2::byte const *)arg1,arg2,arg3,arg4); + result = (Exiv2::ValueType< Exiv2::Rational > *)new Exiv2::ValueType< Exiv2::Rational >((Exiv2::byte const *)arg1,SWIG_STD_MOVE(arg2),arg3,arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -22910,7 +22950,7 @@ SWIGINTERN int _wrap_new_RationalValue__SWIG_2(PyObject *self, PyObject *args, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RationalValue" "', argument " "1"" of type '" "std::pair< int,int > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RationalValue" "', argument " "1"" of type '" "std::pair< int,int > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_RationalValue" "', argument " "1"" of type '" "std::pair< int,int > const &""'"); } arg1 = ptr; } @@ -22962,7 +23002,7 @@ SWIGINTERN int _wrap_new_RationalValue__SWIG_3(PyObject *self, PyObject *args, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RationalValue" "', argument " "1"" of type '" "Exiv2::ValueType< std::pair< int,int > > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RationalValue" "', argument " "1"" of type '" "Exiv2::ValueType< std::pair< int,int > > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_RationalValue" "', argument " "1"" of type '" "Exiv2::ValueType< std::pair< int,int > > const &""'"); } arg1 = reinterpret_cast< Exiv2::ValueType< std::pair< int,int > > * >(argp1); { @@ -23054,7 +23094,7 @@ SWIGINTERN PyObject *_wrap_RationalValue_read__SWIG_0(PyObject *self, PyObject * } { try { - result = (int)(arg1)->read((Exiv2::byte const *)arg2,arg3,arg4); + result = (int)(arg1)->read((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3),arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -23097,7 +23137,7 @@ SWIGINTERN PyObject *_wrap_RationalValue_read__SWIG_1(PyObject *self, PyObject * SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RationalValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RationalValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "RationalValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -23184,7 +23224,7 @@ SWIGINTERN PyObject *_wrap_RationalValue_setDataArea(PyObject *self, PyObject *a } { try { - result = (int)(arg1)->setDataArea((Exiv2::byte const *)arg2,arg3); + result = (int)(arg1)->setDataArea((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3)); } catch(std::exception const& e) { _set_python_exception(); @@ -23420,7 +23460,7 @@ SWIGINTERN PyObject *_wrap_RationalValue_toString(PyObject *self, PyObject *args arg2 = static_cast< size_t >(val2); { try { - result = ((Exiv2::ValueType< Exiv2::Rational > const *)arg1)->toString(arg2); + result = ((Exiv2::ValueType< Exiv2::Rational > const *)arg1)->toString(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -23463,7 +23503,7 @@ SWIGINTERN PyObject *_wrap_RationalValue_toInt64(PyObject *self, PyObject *args) } { try { - result = (int64_t)((Exiv2::ValueType< Exiv2::Rational > const *)arg1)->toInt64(arg2); + result = (int64_t)((Exiv2::ValueType< Exiv2::Rational > const *)arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -23506,7 +23546,7 @@ SWIGINTERN PyObject *_wrap_RationalValue_toUint32(PyObject *self, PyObject *args } { try { - result = (uint32_t)((Exiv2::ValueType< Exiv2::Rational > const *)arg1)->toUint32(arg2); + result = (uint32_t)((Exiv2::ValueType< Exiv2::Rational > const *)arg1)->toUint32(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -23549,7 +23589,7 @@ SWIGINTERN PyObject *_wrap_RationalValue_toFloat(PyObject *self, PyObject *args) } { try { - result = (float)((Exiv2::ValueType< Exiv2::Rational > const *)arg1)->toFloat(arg2); + result = (float)((Exiv2::ValueType< Exiv2::Rational > const *)arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -23592,7 +23632,7 @@ SWIGINTERN PyObject *_wrap_RationalValue_toRational(PyObject *self, PyObject *ar } { try { - result = ((Exiv2::ValueType< Exiv2::Rational > const *)arg1)->toRational(arg2); + result = ((Exiv2::ValueType< Exiv2::Rational > const *)arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -23682,7 +23722,7 @@ SWIGINTERN int _wrap_new_RationalValue__SWIG_4(PyObject *self, PyObject *args, P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RationalValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RationalValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_RationalValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -24017,7 +24057,7 @@ SWIGINTERN int _wrap_new_FloatValue__SWIG_1(PyObject *self, PyObject *args, PyOb } { try { - result = (Exiv2::ValueType< float > *)new Exiv2::ValueType< float >((Exiv2::byte const *)arg1,arg2,arg3,arg4); + result = (Exiv2::ValueType< float > *)new Exiv2::ValueType< float >((Exiv2::byte const *)arg1,SWIG_STD_MOVE(arg2),arg3,arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -24105,7 +24145,7 @@ SWIGINTERN int _wrap_new_FloatValue__SWIG_3(PyObject *self, PyObject *args, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FloatValue" "', argument " "1"" of type '" "Exiv2::ValueType< float > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatValue" "', argument " "1"" of type '" "Exiv2::ValueType< float > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_FloatValue" "', argument " "1"" of type '" "Exiv2::ValueType< float > const &""'"); } arg1 = reinterpret_cast< Exiv2::ValueType< float > * >(argp1); { @@ -24197,7 +24237,7 @@ SWIGINTERN PyObject *_wrap_FloatValue_read__SWIG_0(PyObject *self, PyObject *arg } { try { - result = (int)(arg1)->read((Exiv2::byte const *)arg2,arg3,arg4); + result = (int)(arg1)->read((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3),arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -24240,7 +24280,7 @@ SWIGINTERN PyObject *_wrap_FloatValue_read__SWIG_1(PyObject *self, PyObject *arg SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FloatValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FloatValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "FloatValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -24327,7 +24367,7 @@ SWIGINTERN PyObject *_wrap_FloatValue_setDataArea(PyObject *self, PyObject *args } { try { - result = (int)(arg1)->setDataArea((Exiv2::byte const *)arg2,arg3); + result = (int)(arg1)->setDataArea((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3)); } catch(std::exception const& e) { _set_python_exception(); @@ -24563,7 +24603,7 @@ SWIGINTERN PyObject *_wrap_FloatValue_toString(PyObject *self, PyObject *args) { arg2 = static_cast< size_t >(val2); { try { - result = ((Exiv2::ValueType< float > const *)arg1)->toString(arg2); + result = ((Exiv2::ValueType< float > const *)arg1)->toString(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -24606,7 +24646,7 @@ SWIGINTERN PyObject *_wrap_FloatValue_toInt64(PyObject *self, PyObject *args) { } { try { - result = (int64_t)((Exiv2::ValueType< float > const *)arg1)->toInt64(arg2); + result = (int64_t)((Exiv2::ValueType< float > const *)arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -24649,7 +24689,7 @@ SWIGINTERN PyObject *_wrap_FloatValue_toUint32(PyObject *self, PyObject *args) { } { try { - result = (uint32_t)((Exiv2::ValueType< float > const *)arg1)->toUint32(arg2); + result = (uint32_t)((Exiv2::ValueType< float > const *)arg1)->toUint32(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -24692,7 +24732,7 @@ SWIGINTERN PyObject *_wrap_FloatValue_toFloat(PyObject *self, PyObject *args) { } { try { - result = (float)((Exiv2::ValueType< float > const *)arg1)->toFloat(arg2); + result = (float)((Exiv2::ValueType< float > const *)arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -24735,7 +24775,7 @@ SWIGINTERN PyObject *_wrap_FloatValue_toRational(PyObject *self, PyObject *args) } { try { - result = ((Exiv2::ValueType< float > const *)arg1)->toRational(arg2); + result = ((Exiv2::ValueType< float > const *)arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -24825,7 +24865,7 @@ SWIGINTERN int _wrap_new_FloatValue__SWIG_4(PyObject *self, PyObject *args, PyOb SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FloatValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_FloatValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -25023,7 +25063,7 @@ SWIGINTERN PyObject *_wrap_FloatValue___setitem__(PyObject *self, PyObject *args arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_float,0))))) { - float val; + float val; int ecode = SWIG_AsVal_float(obj2, &val); if (!SWIG_IsOK(ecode)) { SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "FloatValue___setitem__" "', argument " "3"" of type '" "float""'"); @@ -25166,7 +25206,7 @@ SWIGINTERN int _wrap_new_DoubleValue__SWIG_1(PyObject *self, PyObject *args, PyO } { try { - result = (Exiv2::ValueType< double > *)new Exiv2::ValueType< double >((Exiv2::byte const *)arg1,arg2,arg3,arg4); + result = (Exiv2::ValueType< double > *)new Exiv2::ValueType< double >((Exiv2::byte const *)arg1,SWIG_STD_MOVE(arg2),arg3,arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -25254,7 +25294,7 @@ SWIGINTERN int _wrap_new_DoubleValue__SWIG_3(PyObject *self, PyObject *args, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DoubleValue" "', argument " "1"" of type '" "Exiv2::ValueType< double > const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DoubleValue" "', argument " "1"" of type '" "Exiv2::ValueType< double > const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_DoubleValue" "', argument " "1"" of type '" "Exiv2::ValueType< double > const &""'"); } arg1 = reinterpret_cast< Exiv2::ValueType< double > * >(argp1); { @@ -25346,7 +25386,7 @@ SWIGINTERN PyObject *_wrap_DoubleValue_read__SWIG_0(PyObject *self, PyObject *ar } { try { - result = (int)(arg1)->read((Exiv2::byte const *)arg2,arg3,arg4); + result = (int)(arg1)->read((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3),arg4); } catch(std::exception const& e) { _set_python_exception(); @@ -25389,7 +25429,7 @@ SWIGINTERN PyObject *_wrap_DoubleValue_read__SWIG_1(PyObject *self, PyObject *ar SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DoubleValue_read" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleValue_read" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "DoubleValue_read" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -25476,7 +25516,7 @@ SWIGINTERN PyObject *_wrap_DoubleValue_setDataArea(PyObject *self, PyObject *arg } { try { - result = (int)(arg1)->setDataArea((Exiv2::byte const *)arg2,arg3); + result = (int)(arg1)->setDataArea((Exiv2::byte const *)arg2,SWIG_STD_MOVE(arg3)); } catch(std::exception const& e) { _set_python_exception(); @@ -25712,7 +25752,7 @@ SWIGINTERN PyObject *_wrap_DoubleValue_toString(PyObject *self, PyObject *args) arg2 = static_cast< size_t >(val2); { try { - result = ((Exiv2::ValueType< double > const *)arg1)->toString(arg2); + result = ((Exiv2::ValueType< double > const *)arg1)->toString(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -25755,7 +25795,7 @@ SWIGINTERN PyObject *_wrap_DoubleValue_toInt64(PyObject *self, PyObject *args) { } { try { - result = (int64_t)((Exiv2::ValueType< double > const *)arg1)->toInt64(arg2); + result = (int64_t)((Exiv2::ValueType< double > const *)arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -25798,7 +25838,7 @@ SWIGINTERN PyObject *_wrap_DoubleValue_toUint32(PyObject *self, PyObject *args) } { try { - result = (uint32_t)((Exiv2::ValueType< double > const *)arg1)->toUint32(arg2); + result = (uint32_t)((Exiv2::ValueType< double > const *)arg1)->toUint32(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -25841,7 +25881,7 @@ SWIGINTERN PyObject *_wrap_DoubleValue_toFloat(PyObject *self, PyObject *args) { } { try { - result = (float)((Exiv2::ValueType< double > const *)arg1)->toFloat(arg2); + result = (float)((Exiv2::ValueType< double > const *)arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -25884,7 +25924,7 @@ SWIGINTERN PyObject *_wrap_DoubleValue_toRational(PyObject *self, PyObject *args } { try { - result = ((Exiv2::ValueType< double > const *)arg1)->toRational(arg2); + result = ((Exiv2::ValueType< double > const *)arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -25974,7 +26014,7 @@ SWIGINTERN int _wrap_new_DoubleValue__SWIG_4(PyObject *self, PyObject *args, PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DoubleValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DoubleValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_DoubleValue" "', argument " "1"" of type '" "Exiv2::Value const &""'"); } arg1 = reinterpret_cast< Exiv2::Value * >(argp1); { @@ -26172,7 +26212,7 @@ SWIGINTERN PyObject *_wrap_DoubleValue___setitem__(PyObject *self, PyObject *arg arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_double,0))))) { - double val; + double val; int ecode = SWIG_AsVal_double(obj2, &val); if (!SWIG_IsOK(ecode)) { SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "DoubleValue___setitem__" "', argument " "3"" of type '" "double""'"); @@ -26254,16 +26294,16 @@ SwigPyBuiltin__Exiv2__Value_richcompare(PyObject *self, PyObject *other, int op) PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -26310,7 +26350,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Value_methods[] = { ":rtype: int\n" ":return: Return -1 if the value has no data area, else 0.\n" "" }, - { "typeId", _wrap_Value_typeId, METH_VARARGS, " Return the type identifier (Exif data format type)." }, + { "typeId", _wrap_Value_typeId, METH_VARARGS, "Return the type identifier (Exif data format type)." }, { "clone", _wrap_Value_clone, METH_VARARGS, "\n" "Return an auto-pointer to a copy of itself (deep copy).\n" " The caller owns this copy and the auto-pointer ensures that\n" @@ -26329,8 +26369,8 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Value_methods[] = { ":rtype: int\n" ":return: Number of bytes written.\n" "" }, - { "count", _wrap_Value_count, METH_VARARGS, " Return the number of components of the value" }, - { "size", _wrap_Value_size, METH_VARARGS, " Return the size of the value in bytes" }, + { "count", _wrap_Value_count, METH_VARARGS, "Return the number of components of the value" }, + { "size", _wrap_Value_size, METH_VARARGS, "Return the size of the value in bytes" }, { "write", _wrap_Value_write, METH_VARARGS, "\n" "Write the value to an output stream. You do not usually have\n" " to use this function; it is used for the implementation of\n" @@ -26384,7 +26424,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Value_methods[] = { ":rtype: (int, int) tuple\n" ":return: The converted value.\n" "" }, - { "sizeDataArea", _wrap_Value_sizeDataArea, METH_VARARGS, " Return the size of the data area, 0 if there is none." }, + { "sizeDataArea", _wrap_Value_sizeDataArea, METH_VARARGS, "Return the size of the data area, 0 if there is none." }, { "dataArea", _wrap_Value_dataArea, METH_VARARGS, "\n" "Return a copy of the data area if the value has one. The\n" " caller owns this copy and DataBuf ensures that it will be\n" @@ -26446,42 +26486,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Value_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__Value_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.Value", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.value.Value", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__Value_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__Value_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__Value_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - _wrap_Value___str___reprfunc_closure, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__Value_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__Value_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__Value_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__Value_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + _wrap_Value___str___reprfunc_closure, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__Value_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -26492,176 +26533,298 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__Value_type = { "their actual C++ type for simple tasks like reading the values from a\n" "string or data buffer. For other tasks, like modifying values you may\n" "need to downcast it to a specific subclass to access its interface.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__Value_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__Value_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__Value_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__Value_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__Value_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__Value_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_Value_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + _wrap_Value_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Value_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__Value_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__Value_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Value_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Value'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__Value_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Common interface for all types of values used with metadata.\n" + "\n" + "The interface provides a uniform way to access values independent of\n" + "their actual C++ type for simple tasks like reading the values from a\n" + "string or data buffer. For other tasks, like modifying values you may\n" + "need to downcast it to a specific subclass to access its interface.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)_wrap_Value___str___reprfunc_closure }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__Value_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__Value_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__Value_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_Value_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.Value", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Value_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet DataValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__DataValue_getset[] = { @@ -26675,16 +26838,16 @@ SwigPyBuiltin__Exiv2__DataValue_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -26722,219 +26885,335 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DataValue_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__DataValue_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.DataValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_DataValue_destructor_closure,/* tp_dealloc */ + "exiv2.value.DataValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_DataValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__DataValue_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__DataValue_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__DataValue_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__DataValue_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__DataValue_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__DataValue_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__DataValue_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__DataValue_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " %Value for an undefined data type.", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__DataValue_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__DataValue_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__DataValue_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_DataValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "%Value for an undefined data type.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__DataValue_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__DataValue_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__DataValue_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_DataValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_DataValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + _wrap_DataValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__DataValue_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__DataValue_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__DataValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__DataValue_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'DataValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__DataValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_DataValue }, + { Py_tp_dealloc, (void *)_wrap_delete_DataValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"%Value for an undefined data type." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__DataValue_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__DataValue_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__DataValue_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_DataValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.DataValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__DataValue_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet StringValueBase___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__StringValueBase_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Read the value from buf. This default implementation uses buf as it is.", &StringValueBase___dict___getset }, + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"Read the value from buf. This default implementation uses buf as it is.", &StringValueBase___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -26944,21 +27223,21 @@ SwigPyBuiltin__Exiv2__StringValueBase_richcompare(PyObject *self, PyObject *othe PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__StringValueBase_methods[] = { - { "read", _wrap_StringValueBase_read, METH_VARARGS, " Read the value from buf. This default implementation uses buf as it is." }, + { "read", _wrap_StringValueBase_read, METH_VARARGS, "Read the value from buf. This default implementation uses buf as it is." }, { "clone", _wrap_StringValueBase_clone, METH_VARARGS, "" }, { "copy", _wrap_StringValueBase_copy, METH_VARARGS, "\n" "Write value to a character data buffer.\n" @@ -26994,42 +27273,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__StringValueBase_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__StringValueBase_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.StringValueBase", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.value.StringValueBase", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__StringValueBase_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__StringValueBase_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__StringValueBase_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__StringValueBase_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__StringValueBase_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__StringValueBase_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__StringValueBase_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__StringValueBase_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -27038,176 +27318,296 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__StringValueBase_type = { "\n" "Uses a std::string to store the value and implements defaults for\n" "most operations.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__StringValueBase_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__StringValueBase_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__StringValueBase_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__StringValueBase_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__StringValueBase_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__StringValueBase_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_StringValueBase_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_StringValueBase___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_StringValueBase_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_StringValueBase___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__StringValueBase_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__StringValueBase_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__StringValueBase_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__StringValueBase_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'StringValueBase'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__StringValueBase_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Abstract base class for a string based %Value type.\n" + "\n" + "Uses a std::string to store the value and implements defaults for\n" + "most operations.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__StringValueBase_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__StringValueBase_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__StringValueBase_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_StringValueBase_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_StringValueBase___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.StringValueBase", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__StringValueBase_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet StringValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__StringValue_getset[] = { @@ -27229,16 +27629,16 @@ SwigPyBuiltin__Exiv2__StringValue_richcompare(PyObject *self, PyObject *other, i PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -27247,42 +27647,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__StringValue_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__StringValue_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.StringValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_StringValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.StringValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_StringValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__StringValue_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__StringValue_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__StringValue_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__StringValue_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__StringValue_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__StringValue_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__StringValue_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__StringValue_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -27292,180 +27693,301 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__StringValue_type = { "This can be a plain Ascii string or a multiple byte encoded string. It is\n" "left to caller to decode and encode the string to and from readable\n" "text if that is required.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__StringValue_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__StringValue_methods,/* tp_methods */ - 0, /* tp_members */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__StringValue_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__StringValue_methods, /* tp_methods */ + 0, /* tp_members */ SwigPyBuiltin__Exiv2__StringValue_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_StringValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_StringValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__StringValue_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__StringValue_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__StringValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__StringValue_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'StringValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__StringValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_StringValue }, + { Py_tp_dealloc, (void *)_wrap_delete_StringValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "%Value for string type.\n" + "\n" + "This can be a plain Ascii string or a multiple byte encoded string. It is\n" + "left to caller to decode and encode the string to and from readable\n" + "text if that is required.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__StringValue_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__StringValue_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__StringValue_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.StringValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__StringValue_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet AsciiValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__AsciiValue_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Default constructor.", &AsciiValue___dict___getset }, + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"Default constructor.", &AsciiValue___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -27475,16 +27997,16 @@ SwigPyBuiltin__Exiv2__AsciiValue_richcompare(PyObject *self, PyObject *other, in PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -27499,42 +28021,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__AsciiValue_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__AsciiValue_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.AsciiValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_AsciiValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.AsciiValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_AsciiValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__AsciiValue_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__AsciiValue_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__AsciiValue_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__AsciiValue_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__AsciiValue_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__AsciiValue_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__AsciiValue_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__AsciiValue_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -27543,176 +28066,296 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__AsciiValue_type = { "\n" "This class is for null terminated single byte Ascii strings.\n" "This class also ensures that the string is null terminated.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__AsciiValue_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__AsciiValue_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ SwigPyBuiltin__Exiv2__AsciiValue_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__AsciiValue_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_AsciiValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__AsciiValue_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_AsciiValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__AsciiValue_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__AsciiValue_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__AsciiValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__AsciiValue_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'AsciiValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__AsciiValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_AsciiValue }, + { Py_tp_dealloc, (void *)_wrap_delete_AsciiValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "%Value for an Ascii string type.\n" + "\n" + "This class is for null terminated single byte Ascii strings.\n" + "This class also ensures that the string is null terminated.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__AsciiValue_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__AsciiValue_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__AsciiValue_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.AsciiValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__AsciiValue_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet CommentValue___dict___getset = { SwigPyObject_get___dict__, 0 }; static SwigPyGetSet CommentValue_byteOrder__getset = { _wrap_CommentValue_byteOrder__get, _wrap_CommentValue_byteOrder__set }; @@ -27736,16 +28379,16 @@ SwigPyBuiltin__Exiv2__CommentValue_richcompare(PyObject *self, PyObject *other, PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -27797,46 +28440,47 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__CommentValue_methods[] = { "\n" "Todo: Implement rules to guess if the comment is UTF-8 encoded.\n" "" }, - { "charsetId", _wrap_CommentValue_charsetId, METH_VARARGS, " Return the Exif charset id of the comment" }, + { "charsetId", _wrap_CommentValue_charsetId, METH_VARARGS, "Return the Exif charset id of the comment" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__CommentValue_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.CommentValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_CommentValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.CommentValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_CommentValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__CommentValue_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__CommentValue_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__CommentValue_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__CommentValue_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__CommentValue_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__CommentValue_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__CommentValue_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__CommentValue_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -27847,180 +28491,302 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__CommentValue_type = { "comment is expected to be encoded in the character set indicated (default\n" "undefined), but this is not checked. It is left to caller to decode and\n" "encode the string to and from readable text if that is required.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__CommentValue_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__CommentValue_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__CommentValue_getset,/* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_CommentValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__CommentValue_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__CommentValue_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__CommentValue_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_CommentValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__CommentValue_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__CommentValue_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__CommentValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__CommentValue_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'CommentValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__CommentValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_CommentValue }, + { Py_tp_dealloc, (void *)_wrap_delete_CommentValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "%Value for an Exif comment.\n" + "\n" + "This can be a plain Ascii string or a multiple byte encoded string. The\n" + "comment is expected to be encoded in the character set indicated (default\n" + "undefined), but this is not checked. It is left to caller to decode and\n" + "encode the string to and from readable text if that is required.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__CommentValue_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__CommentValue_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__CommentValue_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.CommentValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__CommentValue_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet XmpValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XmpValue_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Return XMP array type, indicates if an XMP value is an array.", &XmpValue___dict___getset }, + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"Return XMP array type, indicates if an XMP value is an array.", &XmpValue___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -28030,22 +28796,22 @@ SwigPyBuiltin__Exiv2__XmpValue_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpValue_methods[] = { - { "xmpArrayType", _wrap_XmpValue_xmpArrayType, METH_VARARGS, " Return XMP array type, indicates if an XMP value is an array." }, - { "xmpStruct", _wrap_XmpValue_xmpStruct, METH_VARARGS, " Return XMP struct, indicates if an XMP value is a structure." }, + { "xmpArrayType", _wrap_XmpValue_xmpArrayType, METH_VARARGS, "Return XMP array type, indicates if an XMP value is an array." }, + { "xmpStruct", _wrap_XmpValue_xmpStruct, METH_VARARGS, "Return XMP struct, indicates if an XMP value is a structure." }, { "size", _wrap_XmpValue_size, METH_VARARGS, "" }, { "copy", _wrap_XmpValue_copy, METH_VARARGS, "\n" "Write value to a character data buffer.\n" @@ -28063,221 +28829,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpValue_methods[] = { ":rtype: int\n" ":return: Number of characters written.\n" "" }, - { "setXmpArrayType", _wrap_XmpValue_setXmpArrayType, METH_VARARGS, " Set the XMP array type to indicate that an XMP value is an array." }, - { "setXmpStruct", _wrap_XmpValue_setXmpStruct, METH_VARARGS, " Set the XMP struct type to indicate that an XMP value is a structure." }, - { "read", _wrap_XmpValue_read, METH_VARARGS, " Notes: Uses read(const std::string& buf)" }, + { "setXmpArrayType", _wrap_XmpValue_setXmpArrayType, METH_VARARGS, "Set the XMP array type to indicate that an XMP value is an array." }, + { "setXmpStruct", _wrap_XmpValue_setXmpStruct, METH_VARARGS, "Set the XMP struct type to indicate that an XMP value is a structure." }, + { "read", _wrap_XmpValue_read, METH_VARARGS, "Notes: Uses read(const std::string& buf)" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpValue_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.XmpValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + "exiv2.value.XmpValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XmpValue_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XmpValue_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XmpValue_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XmpValue_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__XmpValue_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__XmpValue_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__XmpValue_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__XmpValue_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Base class for all Exiv2 values used to store XMP property values.",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__XmpValue_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XmpValue_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XmpValue_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Base class for all Exiv2 values used to store XMP property values.", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__XmpValue_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__XmpValue_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__XmpValue_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpValue_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpValue_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpValue_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)SwigPyBuiltin_BadDealloc }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Base class for all Exiv2 values used to store XMP property values." }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__XmpValue_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__XmpValue_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__XmpValue_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.XmpValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpValue_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet XmpTextValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XmpTextValue_getset[] = { @@ -28299,16 +29181,16 @@ SwigPyBuiltin__Exiv2__XmpTextValue_richcompare(PyObject *self, PyObject *other, PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -28380,42 +29262,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpTextValue_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpTextValue_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.XmpTextValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_XmpTextValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.XmpTextValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_XmpTextValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XmpTextValue_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XmpTextValue_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XmpTextValue_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XmpTextValue_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__XmpTextValue_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__XmpTextValue_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__XmpTextValue_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__XmpTextValue_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -28425,176 +29308,297 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpTextValue_type = { " specific values.\n" "\n" "Uses a std::string to store the value.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__XmpTextValue_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XmpTextValue_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XmpTextValue_getset,/* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_XmpTextValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__XmpTextValue_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__XmpTextValue_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__XmpTextValue_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_XmpTextValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { _wrap_XmpTextValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_XmpTextValue___getitem___ssizeargfunc_closure, /* sq_item */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_XmpTextValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpTextValue_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpTextValue_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpTextValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpTextValue_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpTextValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpTextValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_XmpTextValue }, + { Py_tp_dealloc, (void *)_wrap_delete_XmpTextValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "%Value type suitable for simple XMP properties and\n" + " XMP nodes of complex types which are not parsed into\n" + " specific values.\n" + "\n" + "Uses a std::string to store the value.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__XmpTextValue_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__XmpTextValue_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__XmpTextValue_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_XmpTextValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_XmpTextValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.XmpTextValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpTextValue_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet XmpArrayValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XmpArrayValue_getset[] = { @@ -28625,16 +29629,16 @@ SwigPyBuiltin__Exiv2__XmpArrayValue_richcompare(PyObject *self, PyObject *other, PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -28679,42 +29683,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpArrayValue_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpArrayValue_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.XmpArrayValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_XmpArrayValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.XmpArrayValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_XmpArrayValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XmpArrayValue_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XmpArrayValue_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XmpArrayValue_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XmpArrayValue_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__XmpArrayValue_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__XmpArrayValue_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__XmpArrayValue_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__XmpArrayValue_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -28726,188 +29731,311 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpArrayValue_type = { " LangAltValue.\n" "\n" "Uses a vector of std::string to store the value(s).\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__XmpArrayValue_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XmpArrayValue_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XmpArrayValue_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_XmpArrayValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__XmpArrayValue_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__XmpArrayValue_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__XmpArrayValue_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_XmpArrayValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_XmpArrayValue_count_lenfunc_closure,/* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_XmpArrayValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_XmpArrayValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_XmpArrayValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpArrayValue_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpArrayValue_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpArrayValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpArrayValue_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpArrayValue'."); + return NULL; + } + return pytype; +} -static SwigPyGetSet LangAltValue___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__LangAltValue_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" - "*Overload 1:*\n" - "Constructor.\n" - "\n" - "|\n" +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpArrayValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_XmpArrayValue }, + { Py_tp_dealloc, (void *)_wrap_delete_XmpArrayValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "%Value type for simple arrays. Each item in the array is a simple\n" + " value, without qualifiers. The array may be an ordered (*seq)*,\n" + " unordered (*bag)* or alternative array (*alt)*. The array\n" + " items must not contain qualifiers. For language alternatives use\n" + " LangAltValue.\n" "\n" - "*Overload 2:*\n" - "Constructor, reads the value from a string.\n" - "", &LangAltValue___dict___getset }, + "Uses a vector of std::string to store the value(s).\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__XmpArrayValue_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__XmpArrayValue_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__XmpArrayValue_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_XmpArrayValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_XmpArrayValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.XmpArrayValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpArrayValue_clientdata = {0, 0, 0, 0, 0, 0, 0}; + +static SwigPyGetSet LangAltValue___dict___getset = { SwigPyObject_get___dict__, 0 }; +SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__LangAltValue_getset[] = { + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" + "*Overload 1:*\n" + "Constructor.\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "Constructor, reads the value from a string.\n" + "", &LangAltValue___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -28917,16 +30045,16 @@ SwigPyBuiltin__Exiv2__LangAltValue_richcompare(PyObject *self, PyObject *other, PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -29000,42 +30128,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__LangAltValue_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__LangAltValue_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.LangAltValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_LangAltValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.LangAltValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_LangAltValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__LangAltValue_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__LangAltValue_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__LangAltValue_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__LangAltValue_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__LangAltValue_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__LangAltValue_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__LangAltValue_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__LangAltValue_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -29044,176 +30173,296 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__LangAltValue_type = { "\n" "A language alternative is an array consisting of simple text values,\n" "each of which has a language qualifier.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__LangAltValue_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_LangAltValue___iter___getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__LangAltValue_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__LangAltValue_getset,/* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_LangAltValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__LangAltValue_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_LangAltValue___iter___getiterfunc_closure, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__LangAltValue_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__LangAltValue_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_LangAltValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - _wrap_LangAltValue___getitem___binaryfunc_closure, /* mp_subscript */ - _wrap_LangAltValue___setitem___objobjargproc_closure, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + _wrap_LangAltValue___getitem___binaryfunc_closure, /* mp_subscript */ + _wrap_LangAltValue___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { _wrap_LangAltValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - _wrap_LangAltValue___contains___objobjproc_closure, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + _wrap_LangAltValue___contains___objobjproc_closure, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__LangAltValue_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__LangAltValue_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__LangAltValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__LangAltValue_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'LangAltValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__LangAltValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_LangAltValue }, + { Py_tp_dealloc, (void *)_wrap_delete_LangAltValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "%Value type for XMP language alternative properties.\n" + "\n" + "A language alternative is an array consisting of simple text values,\n" + "each of which has a language qualifier.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__LangAltValue_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__LangAltValue_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__LangAltValue_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)_wrap_LangAltValue___getitem___binaryfunc_closure }, + { Py_mp_ass_subscript, (void *)_wrap_LangAltValue___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_LangAltValue___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_LangAltValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)_wrap_LangAltValue___contains___objobjproc_closure }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.LangAltValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__LangAltValue_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet DateValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__DateValue_getset[] = { @@ -29235,16 +30484,16 @@ SwigPyBuiltin__Exiv2__DateValue_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -29270,7 +30519,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DateValue_methods[] = { "\n" " 1 in case of an unsupported date format\n" "" }, - { "setDate", _wrap_DateValue_setDate, METH_VARARGS, " Set the date" }, + { "setDate", _wrap_DateValue_setDate, METH_VARARGS, "Set the date" }, { "clone", _wrap_DateValue_clone, METH_VARARGS, "" }, { "copy", _wrap_DateValue_copy, METH_VARARGS, "\n" "Write value to a character data buffer.\n" @@ -29288,54 +30537,55 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DateValue_methods[] = { ":rtype: int\n" ":return: Number of characters written.\n" "" }, - { "getDate", _wrap_DateValue_getDate, METH_VARARGS, " Return date struct containing date information" }, + { "getDate", _wrap_DateValue_getDate, METH_VARARGS, "Return date struct containing date information" }, { "count", _wrap_DateValue_count, METH_VARARGS, "" }, { "size", _wrap_DateValue_size, METH_VARARGS, "" }, { "write", _wrap_DateValue_write, METH_VARARGS, "" }, - { "toInt64", _wrap_DateValue_toInt64, METH_VARARGS, " Return the value as a UNIX calendar time converted to int64_t." }, - { "toUint32", _wrap_DateValue_toUint32, METH_VARARGS, " Return the value as a UNIX calendar time converted to uint32_t." }, - { "toFloat", _wrap_DateValue_toFloat, METH_VARARGS, " Return the value as a UNIX calendar time converted to float." }, - { "toRational", _wrap_DateValue_toRational, METH_VARARGS, " Return the value as a UNIX calendar time converted to Rational." }, + { "toInt64", _wrap_DateValue_toInt64, METH_VARARGS, "Return the value as a UNIX calendar time converted to int64_t." }, + { "toUint32", _wrap_DateValue_toUint32, METH_VARARGS, "Return the value as a UNIX calendar time converted to uint32_t." }, + { "toFloat", _wrap_DateValue_toFloat, METH_VARARGS, "Return the value as a UNIX calendar time converted to float." }, + { "toRational", _wrap_DateValue_toRational, METH_VARARGS, "Return the value as a UNIX calendar time converted to Rational." }, { "__getitem__", _wrap_DateValue___getitem__, METH_VARARGS, "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__DateValue_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.DateValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_DateValue_destructor_closure,/* tp_dealloc */ + "exiv2.value.DateValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_DateValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__DateValue_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__DateValue_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__DateValue_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__DateValue_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__DateValue_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__DateValue_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__DateValue_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__DateValue_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -29344,186 +30594,306 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__DateValue_type = { "\n" "This class is limited to parsing simple date strings in the ISO 8601\n" "format CCYYMMDD (century, year, month, day).\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__DateValue_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__DateValue_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__DateValue_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_DateValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__DateValue_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__DateValue_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__DateValue_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_DateValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_DateValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_DateValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_DateValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_DateValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__DateValue_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__DateValue_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__DateValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__DateValue_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'DateValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__DateValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_DateValue }, + { Py_tp_dealloc, (void *)_wrap_delete_DateValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "%Value for simple ISO 8601 dates\n" + "\n" + "This class is limited to parsing simple date strings in the ISO 8601\n" + "format CCYYMMDD (century, year, month, day).\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__DateValue_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__DateValue_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__DateValue_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_DateValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_DateValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.DateValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__DateValue_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet Date_year_getset = { _wrap_Date_year_get, _wrap_Date_year_set }; static SwigPyGetSet Date___dict___getset = { SwigPyObject_get___dict__, 0 }; static SwigPyGetSet Date_day_getset = { _wrap_Date_day_get, _wrap_Date_day_set }; static SwigPyGetSet Date_month_getset = { _wrap_Date_month_get, _wrap_Date_month_set }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__DateValue__Date_getset[] = { - { (char *)"year", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)" Year", &Date_year_getset }, - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Year", &Date___dict___getset }, - { (char *)"day", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)" Day", &Date_day_getset }, - { (char *)"month", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)" Month", &Date_month_getset }, + { (char *)"year", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)"Year", &Date_year_getset }, + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"Year", &Date___dict___getset }, + { (char *)"day", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)"Day", &Date_day_getset }, + { (char *)"month", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)"Month", &Date_month_getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -29533,16 +30903,16 @@ SwigPyBuiltin__Exiv2__DateValue__Date_richcompare(PyObject *self, PyObject *othe PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -29570,215 +30940,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DateValue__Date_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__DateValue__Date_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.Date", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_Date_destructor_closure, /* tp_dealloc */ + "exiv2.value.Date", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_Date_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__DateValue__Date_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__DateValue__Date_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__DateValue__Date_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__DateValue__Date_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__DateValue__Date_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__DateValue__Date_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__DateValue__Date_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__DateValue__Date_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Simple Date helper structure", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__DateValue__Date_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_Date___iter___getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__DateValue__Date_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__DateValue__Date_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_Date, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Simple Date helper structure", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__DateValue__Date_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_Date___iter___getiterfunc_closure, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__DateValue__Date_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__DateValue__Date_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_Date, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - _wrap_Date___getitem___binaryfunc_closure,/* mp_subscript */ - _wrap_Date___setitem___objobjargproc_closure, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + _wrap_Date___getitem___binaryfunc_closure, /* mp_subscript */ + _wrap_Date___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__DateValue__Date_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__DateValue__Date_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__DateValue__Date_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__DateValue__Date_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Date'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__DateValue__Date_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_Date }, + { Py_tp_dealloc, (void *)_wrap_delete_Date_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Simple Date helper structure" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__DateValue__Date_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__DateValue__Date_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__DateValue__Date_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)_wrap_Date___getitem___binaryfunc_closure }, + { Py_mp_ass_subscript, (void *)_wrap_Date___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_Date___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.Date", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__DateValue__Date_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet TimeValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__TimeValue_getset[] = { @@ -29800,16 +31286,16 @@ SwigPyBuiltin__Exiv2__TimeValue_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -29835,7 +31321,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__TimeValue_methods[] = { "\n" " 1 in case of an unsupported time format\n" "" }, - { "setTime", _wrap_TimeValue_setTime, METH_VARARGS, " Set the time" }, + { "setTime", _wrap_TimeValue_setTime, METH_VARARGS, "Set the time" }, { "clone", _wrap_TimeValue_clone, METH_VARARGS, "" }, { "copy", _wrap_TimeValue_copy, METH_VARARGS, "\n" "Write value to a character data buffer.\n" @@ -29853,54 +31339,55 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__TimeValue_methods[] = { ":rtype: int\n" ":return: Number of characters written.\n" "" }, - { "getTime", _wrap_TimeValue_getTime, METH_VARARGS, " Return time struct containing time information" }, + { "getTime", _wrap_TimeValue_getTime, METH_VARARGS, "Return time struct containing time information" }, { "count", _wrap_TimeValue_count, METH_VARARGS, "" }, { "size", _wrap_TimeValue_size, METH_VARARGS, "" }, { "write", _wrap_TimeValue_write, METH_VARARGS, "" }, - { "toInt64", _wrap_TimeValue_toInt64, METH_VARARGS, " Returns number of seconds in the day in UTC." }, - { "toUint32", _wrap_TimeValue_toUint32, METH_VARARGS, " Returns number of seconds in the day in UTC." }, - { "toFloat", _wrap_TimeValue_toFloat, METH_VARARGS, " Returns number of seconds in the day in UTC converted to float." }, - { "toRational", _wrap_TimeValue_toRational, METH_VARARGS, " Returns number of seconds in the day in UTC converted to Rational." }, + { "toInt64", _wrap_TimeValue_toInt64, METH_VARARGS, "Returns number of seconds in the day in UTC." }, + { "toUint32", _wrap_TimeValue_toUint32, METH_VARARGS, "Returns number of seconds in the day in UTC." }, + { "toFloat", _wrap_TimeValue_toFloat, METH_VARARGS, "Returns number of seconds in the day in UTC converted to float." }, + { "toRational", _wrap_TimeValue_toRational, METH_VARARGS, "Returns number of seconds in the day in UTC converted to Rational." }, { "__getitem__", _wrap_TimeValue___getitem__, METH_VARARGS, "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__TimeValue_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.TimeValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_TimeValue_destructor_closure,/* tp_dealloc */ + "exiv2.value.TimeValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_TimeValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__TimeValue_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__TimeValue_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__TimeValue_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__TimeValue_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__TimeValue_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__TimeValue_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__TimeValue_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__TimeValue_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -29911,176 +31398,298 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__TimeValue_type = { "format HHMMSS±HHMM where HHMMSS refers to local hour, minute and\n" "seconds and ±HHMM refers to hours and minutes ahead or behind\n" "Universal Coordinated Time.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__TimeValue_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__TimeValue_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__TimeValue_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_TimeValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__TimeValue_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__TimeValue_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__TimeValue_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_TimeValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_TimeValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_TimeValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_TimeValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_TimeValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__TimeValue_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__TimeValue_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__TimeValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__TimeValue_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'TimeValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__TimeValue_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_TimeValue }, + { Py_tp_dealloc, (void *)_wrap_delete_TimeValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "%Value for simple ISO 8601 times.\n" + "\n" + "This class is limited to handling simple time strings in the ISO 8601\n" + "format HHMMSS±HHMM where HHMMSS refers to local hour, minute and\n" + "seconds and ±HHMM refers to hours and minutes ahead or behind\n" + "Universal Coordinated Time.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__TimeValue_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__TimeValue_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__TimeValue_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_TimeValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_TimeValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.TimeValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__TimeValue_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet Time_tzHour_getset = { _wrap_Time_tzHour_get, _wrap_Time_tzHour_set }; static SwigPyGetSet Time___dict___getset = { SwigPyObject_get___dict__, 0 }; @@ -30089,12 +31698,12 @@ static SwigPyGetSet Time_minute_getset = { _wrap_Time_minute_get, _wrap_Time_min static SwigPyGetSet Time_second_getset = { _wrap_Time_second_get, _wrap_Time_second_set }; static SwigPyGetSet Time_tzMinute_getset = { _wrap_Time_tzMinute_get, _wrap_Time_tzMinute_set }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__TimeValue__Time_getset[] = { - { (char *)"tzHour", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)" Hours ahead or behind UTC", &Time_tzHour_getset }, - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Hour", &Time___dict___getset }, - { (char *)"hour", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)" Hour", &Time_hour_getset }, - { (char *)"minute", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)" Minute", &Time_minute_getset }, - { (char *)"second", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)" Second", &Time_second_getset }, - { (char *)"tzMinute", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)" Minutes ahead or behind UTC", &Time_tzMinute_getset }, + { (char *)"tzHour", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)"Hours ahead or behind UTC", &Time_tzHour_getset }, + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"Hour", &Time___dict___getset }, + { (char *)"hour", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)"Hour", &Time_hour_getset }, + { (char *)"minute", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)"Minute", &Time_minute_getset }, + { (char *)"second", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)"Second", &Time_second_getset }, + { (char *)"tzMinute", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, (char *)"Minutes ahead or behind UTC", &Time_tzMinute_getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -30104,16 +31713,16 @@ SwigPyBuiltin__Exiv2__TimeValue__Time_richcompare(PyObject *self, PyObject *othe PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -30141,215 +31750,331 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__TimeValue__Time_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__TimeValue__Time_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.Time", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_Time_destructor_closure, /* tp_dealloc */ + "exiv2.value.Time", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_Time_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__TimeValue__Time_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__TimeValue__Time_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__TimeValue__Time_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__TimeValue__Time_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__TimeValue__Time_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__TimeValue__Time_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__TimeValue__Time_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__TimeValue__Time_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Simple Time helper structure", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__TimeValue__Time_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_Time___iter___getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__TimeValue__Time_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__TimeValue__Time_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_Time, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "Simple Time helper structure", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__TimeValue__Time_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_Time___iter___getiterfunc_closure, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__TimeValue__Time_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__TimeValue__Time_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_Time, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - _wrap_Time___getitem___binaryfunc_closure,/* mp_subscript */ - _wrap_Time___setitem___objobjargproc_closure, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + _wrap_Time___getitem___binaryfunc_closure, /* mp_subscript */ + _wrap_Time___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__TimeValue__Time_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__TimeValue__Time_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__TimeValue__Time_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__TimeValue__Time_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Time'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__TimeValue__Time_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_Time }, + { Py_tp_dealloc, (void *)_wrap_delete_Time_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"Simple Time helper structure" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__TimeValue__Time_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__TimeValue__Time_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__TimeValue__Time_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)_wrap_Time___getitem___binaryfunc_closure }, + { Py_mp_ass_subscript, (void *)_wrap_Time___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_Time___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.Time", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__TimeValue__Time_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet UShortValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_getset[] = { @@ -30381,16 +32106,16 @@ SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_richcompare(PyObject *self, PyObject PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -30415,7 +32140,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_methods[] = { { "toUint32", _wrap_UShortValue_toUint32, METH_VARARGS, "" }, { "toFloat", _wrap_UShortValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_UShortValue_toRational, METH_VARARGS, "" }, - { "sizeDataArea", _wrap_UShortValue_sizeDataArea, METH_VARARGS, " Return the size of the data area." }, + { "sizeDataArea", _wrap_UShortValue_sizeDataArea, METH_VARARGS, "Return the size of the data area." }, { "dataArea", _wrap_UShortValue_dataArea, METH_VARARGS, "\n" "Return a copy of the data area in a DataBuf. The caller owns\n" " this copy and DataBuf ensures that it will be deleted.\n" @@ -30426,218 +32151,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.UShortValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_UShortValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.UShortValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_UShortValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ + (cmpfunc) 0, /* tp_compare */ #endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type.as_sequence,/* tp_as_sequence */ + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type.as_sequence, /* tp_as_sequence */ &SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type.as_buffer, /* tp_as_buffer */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Sequence of uint16_t values.\n" "The data components can be accessed like a Python list.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_UShortValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_UShortValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_UShortValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_UShortValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_UShortValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_UShortValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - _wrap_UShortValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ + _wrap_UShortValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'UShortValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_UShortValue }, + { Py_tp_dealloc, (void *)_wrap_delete_UShortValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Sequence of uint16_t values.\n" + "The data components can be accessed like a Python list.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_UShortValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_UShortValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)_wrap_UShortValue___setitem___ssizeobjargproc_closure }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.UShortValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet ULongValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_getset[] = { @@ -30669,16 +32513,16 @@ SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_richcompare(PyObject *self, PyObject PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -30703,7 +32547,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_methods[] = { { "toUint32", _wrap_ULongValue_toUint32, METH_VARARGS, "" }, { "toFloat", _wrap_ULongValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_ULongValue_toRational, METH_VARARGS, "" }, - { "sizeDataArea", _wrap_ULongValue_sizeDataArea, METH_VARARGS, " Return the size of the data area." }, + { "sizeDataArea", _wrap_ULongValue_sizeDataArea, METH_VARARGS, "Return the size of the data area." }, { "dataArea", _wrap_ULongValue_dataArea, METH_VARARGS, "\n" "Return a copy of the data area in a DataBuf. The caller owns\n" " this copy and DataBuf ensures that it will be deleted.\n" @@ -30714,218 +32558,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.ULongValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_ULongValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.ULongValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_ULongValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ + (cmpfunc) 0, /* tp_compare */ #endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type.as_sequence,/* tp_as_sequence */ + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type.as_sequence, /* tp_as_sequence */ &SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type.as_buffer, /* tp_as_buffer */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Sequence of uint32_t values.\n" "The data components can be accessed like a Python list.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_ULongValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_ULongValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_ULongValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_ULongValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_ULongValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_ULongValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - _wrap_ULongValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ + _wrap_ULongValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ULongValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_ULongValue }, + { Py_tp_dealloc, (void *)_wrap_delete_ULongValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Sequence of uint32_t values.\n" + "The data components can be accessed like a Python list.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_ULongValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_ULongValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)_wrap_ULongValue___setitem___ssizeobjargproc_closure }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.ULongValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet URationalValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_getset[] = { @@ -30957,16 +32920,16 @@ SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_richcompare(PyObject *self, PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -30991,7 +32954,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_metho { "toUint32", _wrap_URationalValue_toUint32, METH_VARARGS, "" }, { "toFloat", _wrap_URationalValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_URationalValue_toRational, METH_VARARGS, "" }, - { "sizeDataArea", _wrap_URationalValue_sizeDataArea, METH_VARARGS, " Return the size of the data area." }, + { "sizeDataArea", _wrap_URationalValue_sizeDataArea, METH_VARARGS, "Return the size of the data area." }, { "dataArea", _wrap_URationalValue_dataArea, METH_VARARGS, "\n" "Return a copy of the data area in a DataBuf. The caller owns\n" " this copy and DataBuf ensures that it will be deleted.\n" @@ -31002,218 +32965,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_metho { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.URationalValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_URationalValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.URationalValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_URationalValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type.as_number,/* tp_as_number */ - &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type.as_sequence,/* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type.as_mapping,/* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type.as_buffer,/* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Sequence of Exiv2::URational values.\n" "The data components can be accessed like a Python list.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_URationalValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_URationalValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_URationalValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_URationalValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_URationalValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_URationalValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - _wrap_URationalValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ + _wrap_URationalValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'URationalValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_URationalValue }, + { Py_tp_dealloc, (void *)_wrap_delete_URationalValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Sequence of Exiv2::URational values.\n" + "The data components can be accessed like a Python list.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_URationalValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_URationalValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)_wrap_URationalValue___setitem___ssizeobjargproc_closure }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.URationalValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet ShortValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_getset[] = { @@ -31245,16 +33327,16 @@ SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_richcompare(PyObject *self, PyObject PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -31279,7 +33361,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_methods[] = { { "toUint32", _wrap_ShortValue_toUint32, METH_VARARGS, "" }, { "toFloat", _wrap_ShortValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_ShortValue_toRational, METH_VARARGS, "" }, - { "sizeDataArea", _wrap_ShortValue_sizeDataArea, METH_VARARGS, " Return the size of the data area." }, + { "sizeDataArea", _wrap_ShortValue_sizeDataArea, METH_VARARGS, "Return the size of the data area." }, { "dataArea", _wrap_ShortValue_dataArea, METH_VARARGS, "\n" "Return a copy of the data area in a DataBuf. The caller owns\n" " this copy and DataBuf ensures that it will be deleted.\n" @@ -31290,218 +33372,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.ShortValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_ShortValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.ShortValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_ShortValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ + (cmpfunc) 0, /* tp_compare */ #endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type.as_number, /* tp_as_number */ + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type.as_number, /* tp_as_number */ &SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type.as_buffer, /* tp_as_buffer */ + &SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Sequence of int16_t values.\n" "The data components can be accessed like a Python list.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_ShortValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_ShortValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_ShortValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_ShortValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_ShortValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_ShortValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - _wrap_ShortValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ + _wrap_ShortValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ShortValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_ShortValue }, + { Py_tp_dealloc, (void *)_wrap_delete_ShortValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Sequence of int16_t values.\n" + "The data components can be accessed like a Python list.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_ShortValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_ShortValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)_wrap_ShortValue___setitem___ssizeobjargproc_closure }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.ShortValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet LongValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_getset[] = { @@ -31533,16 +33734,16 @@ SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_richcompare(PyObject *self, PyObject PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -31567,7 +33768,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_methods[] = { { "toUint32", _wrap_LongValue_toUint32, METH_VARARGS, "" }, { "toFloat", _wrap_LongValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_LongValue_toRational, METH_VARARGS, "" }, - { "sizeDataArea", _wrap_LongValue_sizeDataArea, METH_VARARGS, " Return the size of the data area." }, + { "sizeDataArea", _wrap_LongValue_sizeDataArea, METH_VARARGS, "Return the size of the data area." }, { "dataArea", _wrap_LongValue_dataArea, METH_VARARGS, "\n" "Return a copy of the data area in a DataBuf. The caller owns\n" " this copy and DataBuf ensures that it will be deleted.\n" @@ -31578,218 +33779,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.LongValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_LongValue_destructor_closure,/* tp_dealloc */ + "exiv2.value.LongValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_LongValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ + (cmpfunc) 0, /* tp_compare */ #endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type.as_number, /* tp_as_number */ + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type.as_number, /* tp_as_number */ &SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type.as_buffer, /* tp_as_buffer */ + &SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Sequence of int32_t values.\n" "The data components can be accessed like a Python list.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_LongValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_LongValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_LongValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_LongValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_LongValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_LongValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - _wrap_LongValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ + _wrap_LongValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'LongValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_LongValue }, + { Py_tp_dealloc, (void *)_wrap_delete_LongValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Sequence of int32_t values.\n" + "The data components can be accessed like a Python list.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_LongValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_LongValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)_wrap_LongValue___setitem___ssizeobjargproc_closure }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.LongValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet RationalValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_getset[] = { @@ -31821,16 +34141,16 @@ SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_richcompare(PyObject *self, P PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -31855,7 +34175,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_method { "toUint32", _wrap_RationalValue_toUint32, METH_VARARGS, "" }, { "toFloat", _wrap_RationalValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_RationalValue_toRational, METH_VARARGS, "" }, - { "sizeDataArea", _wrap_RationalValue_sizeDataArea, METH_VARARGS, " Return the size of the data area." }, + { "sizeDataArea", _wrap_RationalValue_sizeDataArea, METH_VARARGS, "Return the size of the data area." }, { "dataArea", _wrap_RationalValue_dataArea, METH_VARARGS, "\n" "Return a copy of the data area in a DataBuf. The caller owns\n" " this copy and DataBuf ensures that it will be deleted.\n" @@ -31866,218 +34186,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_method { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.RationalValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_RationalValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.RationalValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_RationalValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type.as_number,/* tp_as_number */ - &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type.as_sequence,/* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type.as_mapping,/* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type.as_buffer,/* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Sequence of Exiv2::Rational values.\n" "The data components can be accessed like a Python list.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_RationalValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_RationalValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_RationalValue_count_lenfunc_closure,/* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_RationalValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_RationalValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_RationalValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - _wrap_RationalValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ + _wrap_RationalValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'RationalValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_RationalValue }, + { Py_tp_dealloc, (void *)_wrap_delete_RationalValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Sequence of Exiv2::Rational values.\n" + "The data components can be accessed like a Python list.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_RationalValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_RationalValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)_wrap_RationalValue___setitem___ssizeobjargproc_closure }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.RationalValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet FloatValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ValueTypeT_float_t_getset[] = { @@ -32109,16 +34548,16 @@ SwigPyBuiltin__Exiv2__ValueTypeT_float_t_richcompare(PyObject *self, PyObject *o PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -32143,7 +34582,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_float_t_methods[] = { { "toUint32", _wrap_FloatValue_toUint32, METH_VARARGS, "" }, { "toFloat", _wrap_FloatValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_FloatValue_toRational, METH_VARARGS, "" }, - { "sizeDataArea", _wrap_FloatValue_sizeDataArea, METH_VARARGS, " Return the size of the data area." }, + { "sizeDataArea", _wrap_FloatValue_sizeDataArea, METH_VARARGS, "Return the size of the data area." }, { "dataArea", _wrap_FloatValue_dataArea, METH_VARARGS, "\n" "Return a copy of the data area in a DataBuf. The caller owns\n" " this copy and DataBuf ensures that it will be deleted.\n" @@ -32154,218 +34593,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_float_t_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.FloatValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_FloatValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.FloatValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_FloatValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Sequence of float values.\n" "The data components can be accessed like a Python list.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ValueTypeT_float_t_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ValueTypeT_float_t_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ValueTypeT_float_t_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_FloatValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ValueTypeT_float_t_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ValueTypeT_float_t_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ValueTypeT_float_t_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_FloatValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_FloatValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_FloatValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_FloatValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_FloatValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - _wrap_FloatValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ + _wrap_FloatValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_float_t_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'FloatValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_FloatValue }, + { Py_tp_dealloc, (void *)_wrap_delete_FloatValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Sequence of float values.\n" + "The data components can be accessed like a Python list.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_float_t_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_float_t_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_float_t_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_FloatValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_FloatValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)_wrap_FloatValue___setitem___ssizeobjargproc_closure }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.FloatValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_float_t_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet DoubleValue___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ValueTypeT_double_t_getset[] = { @@ -32397,16 +34955,16 @@ SwigPyBuiltin__Exiv2__ValueTypeT_double_t_richcompare(PyObject *self, PyObject * PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -32431,7 +34989,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_double_t_methods[] = { { "toUint32", _wrap_DoubleValue_toUint32, METH_VARARGS, "" }, { "toFloat", _wrap_DoubleValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_DoubleValue_toRational, METH_VARARGS, "" }, - { "sizeDataArea", _wrap_DoubleValue_sizeDataArea, METH_VARARGS, " Return the size of the data area." }, + { "sizeDataArea", _wrap_DoubleValue_sizeDataArea, METH_VARARGS, "Return the size of the data area." }, { "dataArea", _wrap_DoubleValue_dataArea, METH_VARARGS, "\n" "Return a copy of the data area in a DataBuf. The caller owns\n" " this copy and DataBuf ensures that it will be deleted.\n" @@ -32442,218 +35000,337 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_double_t_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.value.DoubleValue", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_DoubleValue_destructor_closure, /* tp_dealloc */ + "exiv2.value.DoubleValue", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_DoubleValue_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type.as_buffer, /* tp_as_buffer */ + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Sequence of double values.\n" "The data components can be accessed like a Python list.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__ValueTypeT_double_t_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__ValueTypeT_double_t_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__ValueTypeT_double_t_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_DoubleValue, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__ValueTypeT_double_t_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__ValueTypeT_double_t_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__ValueTypeT_double_t_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_DoubleValue, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_DoubleValue_count_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - _wrap_DoubleValue___getitem___ssizeargfunc_closure, /* sq_item */ + _wrap_DoubleValue_count_lenfunc_closure, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + _wrap_DoubleValue___getitem___ssizeargfunc_closure, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - _wrap_DoubleValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ + _wrap_DoubleValue___setitem___ssizeobjargproc_closure, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_double_t_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'DoubleValue'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_DoubleValue }, + { Py_tp_dealloc, (void *)_wrap_delete_DoubleValue_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Sequence of double values.\n" + "The data components can be accessed like a Python list.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_double_t_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_double_t_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__ValueTypeT_double_t_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)_wrap_DoubleValue_count_lenfunc_closure }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)_wrap_DoubleValue___getitem___ssizeargfunc_closure }, + { Py_sq_ass_item, (void *)_wrap_DoubleValue___setitem___ssizeobjargproc_closure }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.value.DoubleValue", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ValueTypeT_double_t_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -33211,7 +35888,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -33394,7 +36071,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -33420,8 +36097,7 @@ SWIG_init(void) { /* type 'Exiv2::Value' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Value_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); { PyObject* module = PyImport_ImportModule("enum"); @@ -33433,31 +36109,26 @@ SWIG_init(void) { return NULL; } - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'Value'."); + builtin_pytype = SwigPyBuiltin__Exiv2__Value_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__Value_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "Value", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "Value"); d = md; /* type 'Exiv2::DataValue' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__DataValue_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33471,27 +36142,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'DataValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__DataValue_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__DataValue_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "DataValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "DataValue"); d = md; /* type 'Exiv2::StringValueBase' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__StringValueBase_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33505,27 +36173,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'StringValueBase'."); + builtin_pytype = SwigPyBuiltin__Exiv2__StringValueBase_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__StringValueBase_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "StringValueBase", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "StringValueBase"); d = md; /* type 'Exiv2::StringValue' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__StringValue_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__StringValueBase"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33539,27 +36204,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'StringValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__StringValue_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__StringValue_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "StringValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "StringValue"); d = md; /* type 'Exiv2::AsciiValue' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__AsciiValue_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__StringValueBase"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33573,29 +36235,26 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'AsciiValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__AsciiValue_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__AsciiValue_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "AsciiValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "AsciiValue"); d = md; /* type 'Exiv2::CommentValue' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__CommentValue_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "CharsetId",_create_enum_Exiv2_CommentValue_CharsetId( "CharsetId", "Character set identifiers for the character sets defined by Exif.", _get_enum_list(0, "ascii",Exiv2::CommentValue::ascii,"jis",Exiv2::CommentValue::jis,"unicode",Exiv2::CommentValue::unicode,"undefined",Exiv2::CommentValue::undefined,"invalidCharsetId",Exiv2::CommentValue::invalidCharsetId,"lastCharsetId",Exiv2::CommentValue::lastCharsetId, NULL))); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__StringValueBase"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33609,31 +36268,28 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'CommentValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__CommentValue_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__CommentValue_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "CommentValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "CommentValue"); d = md; /* type 'Exiv2::XmpValue' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpValue_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "XmpArrayType",_create_enum_Exiv2_XmpValue_XmpArrayType( "XmpArrayType", "XMP array types.", _get_enum_list(0, "xaNone",Exiv2::XmpValue::xaNone,"xaAlt",Exiv2::XmpValue::xaAlt,"xaBag",Exiv2::XmpValue::xaBag,"xaSeq",Exiv2::XmpValue::xaSeq, NULL))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "XmpStruct",_create_enum_Exiv2_XmpValue_XmpStruct( "XmpStruct", "XMP structure indicator.", _get_enum_list(0, "xsNone",Exiv2::XmpValue::xsNone,"xsStruct",Exiv2::XmpValue::xsStruct, NULL))); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33647,27 +36303,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__XmpValue_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__XmpValue_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpValue"); d = md; /* type 'Exiv2::XmpTextValue' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpTextValue_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__XmpValue"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33681,27 +36334,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpTextValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__XmpTextValue_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__XmpTextValue_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpTextValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpTextValue"); d = md; /* type 'Exiv2::XmpArrayValue' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpArrayValue_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__XmpValue"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33715,27 +36365,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpArrayValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__XmpArrayValue_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__XmpArrayValue_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpArrayValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpArrayValue"); d = md; /* type 'Exiv2::LangAltValue' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__LangAltValue_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__XmpValue"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33749,27 +36396,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'LangAltValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__LangAltValue_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__LangAltValue_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "LangAltValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "LangAltValue"); d = md; /* type 'Exiv2::DateValue' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__DateValue_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33783,50 +36427,44 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'DateValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__DateValue_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__DateValue_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "DateValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "DateValue"); d = md; /* type 'Exiv2::DateValue::Date' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__DateValue__Date_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'Date'."); + builtin_pytype = SwigPyBuiltin__Exiv2__DateValue__Date_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__DateValue__Date_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "Date", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "Date"); d = md; /* type 'Exiv2::TimeValue' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__TimeValue_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33840,50 +36478,44 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'TimeValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__TimeValue_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__TimeValue_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "TimeValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "TimeValue"); d = md; /* type 'Exiv2::TimeValue::Time' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__TimeValue__Time_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'Time'."); + builtin_pytype = SwigPyBuiltin__Exiv2__TimeValue__Time_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__TimeValue__Time_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "Time", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "Time"); d = md; /* type 'Exiv2::ValueType< uint16_t >' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33897,27 +36529,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'UShortValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "UShortValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "UShortValue"); d = md; /* type 'Exiv2::ValueType< uint32_t >' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33931,27 +36560,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'ULongValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "ULongValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "ULongValue"); d = md; /* type 'Exiv2::ValueType< Exiv2::URational >' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33965,27 +36591,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'URationalValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "URationalValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "URationalValue"); d = md; /* type 'Exiv2::ValueType< int16_t >' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -33999,27 +36622,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'ShortValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "ShortValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "ShortValue"); d = md; /* type 'Exiv2::ValueType< int32_t >' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -34033,27 +36653,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'LongValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "LongValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "LongValue"); d = md; /* type 'Exiv2::ValueType< Exiv2::Rational >' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -34067,27 +36684,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'RationalValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "RationalValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "RationalValue"); d = md; /* type 'Exiv2::ValueType< float >' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -34101,27 +36715,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'FloatValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ValueTypeT_float_t_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ValueTypeT_float_t_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "FloatValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "FloatValue"); d = md; /* type 'Exiv2::ValueType< double >' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Value"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -34135,18 +36746,18 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'DoubleValue'."); + builtin_pytype = SwigPyBuiltin__Exiv2__ValueTypeT_double_t_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__ValueTypeT_double_t_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "DoubleValue", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "DoubleValue"); d = md; diff --git a/src/swig-0_28_3/version.py b/src/swig-0_28_3/version.py index 81340a2e..ede4f15e 100644 --- a/src/swig-0_28_3/version.py +++ b/src/swig-0_28_3/version.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_28_3/version_wrap.cxx b/src/swig-0_28_3/version_wrap.cxx index bd3a7841..70072ba2 100644 --- a/src/swig-0_28_3/version_wrap.cxx +++ b/src/swig-0_28_3/version_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_version" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -3964,7 +4016,6 @@ static swig_module_info swig_module = {swig_types, 10, 0, 0, 0, 0}; # define SWIG_init init_version #endif -#define SWIG_name "_version" #ifdef __cplusplus #include @@ -4034,7 +4085,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4042,7 +4093,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4050,8 +4101,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4060,7 +4111,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4083,7 +4134,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4097,11 +4148,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4258,7 +4307,7 @@ static void _set_python_exception() { Py_DECREF(args); } - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4665,10 +4714,10 @@ SWIGINTERN PyObject *_wrap_testVersion(PyObject *self, PyObject *args) { static PyMethodDef SwigMethods[] = { { "versionInfo", _wrap_versionInfo, METH_NOARGS, "Return a dict of libexiv2 build options."}, - { "versionNumber", _wrap_versionNumber, METH_NOARGS, " Return the version of %Exiv2 available at runtime as a uint32_t."}, - { "versionString", _wrap_versionString, METH_NOARGS, " Return the version string Example: \"0.25.0\" (major.minor.patch)"}, - { "versionNumberHexString", _wrap_versionNumberHexString, METH_NOARGS, " Return the version of %Exiv2 as hex string of fixed length 6."}, - { "version", _wrap_version, METH_NOARGS, " Return the version of %Exiv2 as \"C\" string eg \"0.27.0.2\"."}, + { "versionNumber", _wrap_versionNumber, METH_NOARGS, "Return the version of %Exiv2 available at runtime as a uint32_t."}, + { "versionString", _wrap_versionString, METH_NOARGS, "Return the version string Example: \"0.25.0\" (major.minor.patch)"}, + { "versionNumberHexString", _wrap_versionNumberHexString, METH_NOARGS, "Return the version of %Exiv2 as hex string of fixed length 6."}, + { "version", _wrap_version, METH_NOARGS, "Return the version of %Exiv2 as \"C\" string eg \"0.27.0.2\"."}, { "testVersion", _wrap_testVersion, METH_VARARGS, "\n" "Test the version of the available %Exiv2 library at runtime. Return\n" " true if it is the same as or newer than the passed-in version.\n" @@ -5002,7 +5051,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -5185,7 +5234,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) diff --git a/src/swig-0_28_3/xmp.py b/src/swig-0_28_3/xmp.py index fa7276a7..ec9c97fb 100644 --- a/src/swig-0_28_3/xmp.py +++ b/src/swig-0_28_3/xmp.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (https://www.swig.org). -# Version 4.2.1 +# Version 4.3.0 # # Do not make changes to this file unless you know what you are doing - modify # the SWIG interface file instead. diff --git a/src/swig-0_28_3/xmp_wrap.cxx b/src/swig-0_28_3/xmp_wrap.cxx index 36bed8ed..6bacb37d 100644 --- a/src/swig-0_28_3/xmp_wrap.cxx +++ b/src/swig-0_28_3/xmp_wrap.cxx @@ -1,18 +1,19 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (https://www.swig.org). - * Version 4.2.1 + * Version 4.3.0 * * Do not make changes to this file unless you know what you are doing - modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#define SWIG_VERSION 0x040201 +#define SWIG_VERSION 0x040300 #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIGPYTHON_BUILTIN #define SWIGPYTHON_FASTPROXY +#define SWIG_name "_xmp" /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. @@ -147,6 +148,10 @@ * swigcompat.swg * * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. * ----------------------------------------------------------------------------- */ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF @@ -200,11 +205,24 @@ # include #endif +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +# define SWIG_HEAPTYPES + +/* Note: Currently this won't activate - it is in place ready for when the + * SWIGPYTHON_BUILTIN condition above gets removed. */ +# if PY_VERSION_HEX < 0x030c0000 && defined(SWIGPYTHON_BUILTIN) +# include +# define Py_READONLY READONLY +# define Py_T_PYSSIZET T_PYSSIZET +# endif +#endif + #if __GNUC__ >= 7 #pragma GCC diagnostic pop #endif #include +#include /* ----------------------------------------------------------------------------- * swigrun.swg @@ -823,10 +841,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #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 @@ -845,10 +859,11 @@ SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes *pbytes = NULL; return PyUnicode_AsUTF8AndSize(str, psize); # else - *pbytes = PyUnicode_AsUTF8String(str); - const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; - if (chars && psize) - *psize = PyBytes_Size(*pbytes); + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); return chars; # endif #else @@ -869,10 +884,6 @@ SWIG_Python_str_FromChar(const char *c) #endif } -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ # define SWIGPY_USE_CAPSULE #ifdef SWIGPYTHON_BUILTIN @@ -902,6 +913,19 @@ SWIG_Python_str_FromChar(const char *c) # define PySliceObject PyObject #endif +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ @@ -943,6 +967,9 @@ SWIG_Python_ErrorType(int code) { case SWIG_AttributeError: type = PyExc_AttributeError; break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; default: type = PyExc_RuntimeError; } @@ -964,14 +991,14 @@ SWIG_Python_AddErrorMsg(const char* mesg) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); PyErr_Clear(); - Py_XINCREF(type); + SWIG_Py_XINCREF(type); if (tmp) PyErr_Format(type, "%s %s", tmp, mesg); else PyErr_Format(type, "%s", mesg); - Py_XDECREF(bytes); - Py_DECREF(old_str); - Py_DECREF(value); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } @@ -1001,7 +1028,7 @@ SWIG_Python_RaiseOrModifyTypeError(const char *message) newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); #endif if (newvalue) { - Py_XDECREF(value); + SWIG_Py_XDECREF(value); PyErr_Restore(type, newvalue, traceback); } else { PyErr_Restore(type, value, traceback); @@ -1186,7 +1213,7 @@ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1207,13 +1234,13 @@ SWIGINTERN void SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { PyObject *s = PyString_InternFromString(key); PyList_Append(seq, s); - Py_DECREF(s); + SWIG_Py_DECREF(s); } SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); if (public_interface) SwigPyBuiltin_AddPublicSymbol(public_interface, name); } @@ -1223,7 +1250,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } #endif @@ -1231,11 +1258,11 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { /* Append a value to the result obj */ SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { if (!result) { result = obj; - } else if (result == Py_None) { - Py_DECREF(result); + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { @@ -1244,12 +1271,12 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { if (result) { PyList_SET_ITEM(result, 0, o2); } else { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); return o2; } } PyList_Append(result,obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } return result; } @@ -1373,21 +1400,21 @@ swig_varlink_str(PyObject *o) { for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); str = joined; #else PyObject *str = PyString_FromString("("); @@ -1452,7 +1479,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { @@ -1468,9 +1495,9 @@ swig_varlink_type(void) { 0, /* tp_itemsize */ (destructor) swig_varlink_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc) swig_varlink_getattr, /* tp_getattr */ (setattrfunc) swig_varlink_setattr, /* tp_setattr */ @@ -1503,9 +1530,12 @@ swig_varlink_type(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -1606,7 +1636,7 @@ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; - Py_INCREF(none); + SWIG_Py_INCREF(none); return none; } @@ -1649,27 +1679,27 @@ SwigPyClientData_New(PyObject* obj) SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(data->klass); + SWIG_Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } else { data->newraw = PyObject_GetAttrString(data->klass, "__new__"); if (data->newraw) { data->newargs = PyTuple_New(1); if (data->newargs) { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); PyTuple_SET_ITEM(data->newargs, 0, obj); } else { - Py_DECREF(data->newraw); - Py_DECREF(data->klass); + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); free(data); return 0; } } else { - Py_INCREF(obj); + SWIG_Py_INCREF(obj); data->newargs = obj; } } @@ -1693,10 +1723,10 @@ SwigPyClientData_New(PyObject* obj) SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->klass); - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); free(data); } @@ -1724,7 +1754,7 @@ SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) if (!sobj->dict) sobj->dict = PyDict_New(); - Py_XINCREF(sobj->dict); + SWIG_Py_XINCREF(sobj->dict); return sobj->dict; } @@ -1753,10 +1783,10 @@ SwigPyObject_format(const char* fmt, SwigPyObject *v) #else res = PyString_Format(ofmt,args); #endif - Py_DECREF(ofmt); + SWIG_Py_DECREF(ofmt); } } - Py_DECREF(args); + SWIG_Py_DECREF(args); } return res; } @@ -1783,14 +1813,14 @@ SwigPyObject_repr(SwigPyObject *v) if (nrep) { # if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); repr = joined; # else PyString_ConcatAndDel(&repr,nrep); # endif } else { - Py_DecRef(repr); + SWIG_Py_DECREF(repr); repr = NULL; } } @@ -1820,7 +1850,7 @@ SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) PyObject* res = NULL; if (!PyErr_Occurred()) { if (op != Py_EQ && op != Py_NE) { - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); @@ -1859,15 +1889,18 @@ SwigPyObject_Check(PyObject *op) { return 1; return (strcmp(op_type->tp_name, "SwigPyObject") == 0); #else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif if (op_type == target_tp) return 1; # ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; # else return (strcmp(op_type->tp_name, "SwigPyObject") == 0); @@ -1911,7 +1944,7 @@ SwigPyObject_dealloc(PyObject *v) } else { res = 0; } - Py_XDECREF(tmp); + SWIG_Py_XDECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); @@ -1922,7 +1955,7 @@ SwigPyObject_dealloc(PyObject *v) PyErr_Restore(type, value, traceback); - Py_XDECREF(res); + SWIG_Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { @@ -1930,13 +1963,13 @@ SwigPyObject_dealloc(PyObject *v) printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif - Py_XDECREF(Swig_Capsule_global); + SWIG_Py_XDECREF(Swig_Capsule_global); } - Py_XDECREF(next); + SWIG_Py_XDECREF(next); #ifdef SWIGPYTHON_BUILTIN - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); #endif - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyObject* @@ -1949,7 +1982,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) } ((SwigPyObject *)next)->next = sobj->next; sobj->next = next; - Py_INCREF(next); + SWIG_Py_INCREF(next); return SWIG_Py_Void(); } @@ -1958,7 +1991,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { - Py_INCREF(sobj->next); + SWIG_Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); @@ -1992,9 +2025,9 @@ SwigPyObject_own(PyObject *v, PyObject *args) PyObject *obj = PyBool_FromLong(sobj->own); if (val) { if (PyObject_IsTrue(val)) { - Py_DECREF(SwigPyObject_acquire(v,args)); + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); } else { - Py_DECREF(SwigPyObject_disown(v,args)); + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); } } return obj; @@ -2015,7 +2048,7 @@ swigobject_methods[] = { SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ @@ -2075,9 +2108,9 @@ SwigPyObject_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2133,9 +2166,12 @@ SwigPyObject_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2165,7 +2201,7 @@ SwigPyObject_TypeOnce(void) { "SwigPyObject", sizeof(SwigPyObject), 0, - Py_TPFLAGS_DEFAULT, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, slots }; return (PyTypeObject *)PyType_FromSpec(&spec); @@ -2188,7 +2224,7 @@ SwigPyObject_New(void *ptr, swig_type_info *ty, int own) /* Obtain a reference to the Python capsule wrapping the module information, so that the * module information is correctly destroyed after all SWIG python objects have been freed * by the GC (and corresponding destructors invoked) */ - Py_XINCREF(Swig_Capsule_global); + SWIG_Py_XINCREF(Swig_Capsule_global); } } return (PyObject *)sobj; @@ -2246,16 +2282,19 @@ SwigPyPacked_type(void) { SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif PyTypeObject* op_type = Py_TYPE(op); if (op_type == SwigPyPacked_TypeOnce()) return 1; #ifdef Py_LIMITED_API - int cmp; - PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); if (!tp_name) return 0; cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); - Py_DECREF(tp_name); + SWIG_Py_DECREF(tp_name); return cmp == 0; #else return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); @@ -2269,13 +2308,13 @@ SwigPyPacked_dealloc(PyObject *v) SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } - PyObject_DEL(v); + PyObject_Free(v); } SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; -#ifndef Py_LIMITED_API +#ifndef SWIG_HEAPTYPES static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { @@ -2291,9 +2330,9 @@ SwigPyPacked_TypeOnce(void) { 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc)0, /*tp_print*/ + (printfunc)0, /* tp_print */ #else - (Py_ssize_t)0, /*tp_vectorcall_offset*/ + (Py_ssize_t)0, /* tp_vectorcall_offset */ #endif (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ @@ -2349,9 +2388,12 @@ SwigPyPacked_TypeOnce(void) { #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) 0, /* tp_print */ #endif -#if PY_VERSION_HEX >= 0x030C0000 +#if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -2398,7 +2440,7 @@ SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) sobj->ty = ty; sobj->size = size; } else { - PyObject_DEL((PyObject *) sobj); + PyObject_Free((PyObject *)sobj); sobj = 0; } } @@ -2451,7 +2493,12 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) (void)obj; # ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif if (pyobj && SwigPyObject_Check(pyobj)) return (SwigPyObject*) pyobj; } @@ -2478,7 +2525,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2488,7 +2535,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; @@ -2614,7 +2661,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } } - Py_DECREF(impconv); + SWIG_Py_DECREF(impconv); } } } @@ -2652,8 +2699,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; #ifdef Py_LIMITED_API - Py_XDECREF(bytes); - Py_XDECREF(pystr_doc); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); #endif if (!desc) return SWIG_ERROR; @@ -2713,13 +2760,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); } else{ - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } } #else if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } #endif @@ -2736,24 +2783,24 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); #endif inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); - Py_DECREF(empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); if (inst) { if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { - Py_DECREF(inst); + SWIG_Py_DECREF(inst); inst = 0; } else { PyType_Modified(Py_TYPE(inst)); } } } - Py_DECREF(empty_args); + SWIG_Py_DECREF(empty_args); } #else PyObject *dict = PyDict_New(); if (dict) { PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + SWIG_Py_DECREF(dict); } #endif } @@ -2790,7 +2837,7 @@ SWIG_Python_InitShadowInstance(PyObject *args) { } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); } else { if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) return NULL; @@ -2854,7 +2901,7 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f robj = SwigPyObject_New(ptr, type, own); if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); + SWIG_Py_DECREF(robj); robj = inst; } return robj; @@ -2923,11 +2970,11 @@ SWIG_Python_DestroyModule(PyObject *obj) if (data) SwigPyClientData_Del(data); } } - Py_DECREF(SWIG_This()); + SWIG_Py_DECREF(SWIG_This()); Swig_This_global = NULL; - Py_DECREF(SWIG_globals()); + SWIG_Py_DECREF(SWIG_globals()); Swig_Globals_global = NULL; - Py_DECREF(SWIG_Python_TypeCache()); + SWIG_Py_DECREF(SWIG_Python_TypeCache()); Swig_TypeCache_global = NULL; Swig_Capsule_global = NULL; } @@ -2947,10 +2994,10 @@ SWIG_Python_SetModule(swig_module_info *swig_module) { ++interpreter_counter; Swig_Capsule_global = pointer; } else { - Py_DECREF(pointer); + SWIG_Py_DECREF(pointer); } } else { - Py_XDECREF(pointer); + SWIG_Py_XDECREF(pointer); } } @@ -2970,11 +3017,11 @@ SWIG_Python_TypeQuery(const char *type) obj = PyCapsule_New((void*) descriptor, NULL, NULL); if (obj) { PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } - Py_DECREF(key); + SWIG_Py_DECREF(key); return descriptor; } @@ -2998,15 +3045,15 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront) PyObject *bytes = NULL; const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); const char *errmesg = tmp ? tmp : "Invalid error message"; - Py_XINCREF(type); + SWIG_Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, errmesg); } else { PyErr_Format(type, "%s %s", errmesg, mesg); } - Py_XDECREF(bytes); - Py_DECREF(old_str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); } return 1; } else { @@ -3038,6 +3085,7 @@ SwigPyObject_GetDesc(PyObject *self) SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { + (void) obj; if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { @@ -3064,8 +3112,8 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } - Py_XDECREF(bytes); - Py_XDECREF(str); + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); return; } #endif @@ -3109,7 +3157,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); return -1; } else { - Py_INCREF(name); + SWIG_Py_INCREF(name); } if (!tp->tp_dict) { @@ -3124,20 +3172,20 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { if (!f) { if (PyString_Check(name)) { encoded_name = name; - Py_INCREF(name); + SWIG_Py_INCREF(name); } else { encoded_name = PyUnicode_AsUTF8String(name); if (!encoded_name) goto done; } PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); + SWIG_Py_DECREF(encoded_name); } else { res = f(descr, obj, value); } done: - Py_DECREF(name); + SWIG_Py_DECREF(name); return res; } #endif @@ -3210,7 +3258,7 @@ SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) { tuple = PyTuple_New(0); assert(tuple); result = (*getset->get)(obj, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3242,11 +3290,11 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) { } tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(val); + SWIG_Py_INCREF(val); PyTuple_SET_ITEM(tuple, 0, val); result = (*getset->set)(obj, tuple); - Py_DECREF(tuple); - Py_XDECREF(result); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } @@ -3264,15 +3312,15 @@ SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) return -1; } result = (*getset->set)(obj, val); - Py_XDECREF(result); + SWIG_Py_XDECREF(result); return result ? 0 : -1; } SWIGINTERN void SwigPyStaticVar_dealloc(PyDescrObject *descr) { PyObject_GC_UnTrack(descr); - Py_XDECREF(PyDescr_TYPE(descr)); - Py_XDECREF(PyDescr_NAME(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_TYPE(descr)); + SWIG_Py_XDECREF((PyObject *)PyDescr_NAME(descr)); PyObject_GC_Del(descr); } @@ -3422,6 +3470,9 @@ SwigPyStaticVar_Type(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3513,6 +3564,9 @@ SwigPyObjectType(void) { #if PY_VERSION_HEX >= 0x030c0000 0, /* tp_watched */ #endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif #ifdef COUNT_ALLOCS 0, /* tp_allocs */ 0, /* tp_frees */ @@ -3536,19 +3590,19 @@ SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); - Py_XINCREF(type); + SWIG_Py_XINCREF((PyObject *)type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { - Py_DECREF(descr); + SWIG_Py_DECREF((PyObject *)descr); descr = NULL; } return descr; } -SWIGINTERN void -SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { +SWIGINTERN PyObject * +SwigPyBuiltin_InitBases(PyTypeObject **bases) { Py_ssize_t base_count = 0; PyTypeObject **b; PyObject *tuple; @@ -3558,23 +3612,21 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) { bases[0] = SwigPyObject_type(); bases[1] = NULL; } - type->tp_base = bases[0]; - Py_INCREF((PyObject *)bases[0]); for (b = bases; *b != NULL; ++b) ++base_count; tuple = PyTuple_New(base_count); for (i = 0; i < base_count; ++i) { - Py_INCREF((PyObject *)bases[i]); + SWIG_Py_INCREF((PyObject *)bases[i]); PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]); } - type->tp_bases = tuple; + return tuple; } SWIGINTERN PyObject * SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) { PyObject *result; result = (PyObject *)SWIG_Python_GetSwigThis(self); - Py_XINCREF(result); + SWIG_Py_XINCREF(result); return result; } @@ -3612,7 +3664,7 @@ SWIGINTERN void SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) { SwigPyObject *sobj; sobj = (SwigPyObject *)a; - Py_XDECREF(sobj->dict); + SWIG_Py_XDECREF(sobj->dict); if (sobj->own) { PyObject *o; PyObject *type = 0, *value = 0, *traceback = 0; @@ -3621,15 +3673,15 @@ SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrap if (!o) { PyObject *deallocname = PyString_FromString(wrappername); PyErr_WriteUnraisable(deallocname); - Py_DECREF(deallocname); + SWIG_Py_DECREF(deallocname); } PyErr_Restore(type, value, traceback); - Py_XDECREF(o); + SWIG_Py_XDECREF(o); } if (PyType_IS_GC(a->ob_type)) { PyObject_GC_Del(a); } else { - PyObject_Del(a); + PyObject_Free(a); } } @@ -3644,7 +3696,7 @@ SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) { int result; pyresult = wrapper(a, NULL); result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3668,10 +3720,10 @@ SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple, *result; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3687,14 +3739,14 @@ SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py PyObject *tuple, *result; tuple = PyTuple_New(2); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3720,7 +3772,7 @@ SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { Py_ssize_t result; resultobj = wrapper(a, NULL); result = PyNumber_AsSsize_t(resultobj, NULL); - Py_DECREF(resultobj); + SWIG_Py_DECREF(resultobj); return result; } @@ -3737,7 +3789,7 @@ SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3755,13 +3807,13 @@ SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObje PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); if (d) { - Py_INCREF(d); + SWIG_Py_INCREF(d); PyTuple_SET_ITEM(tuple, 2, d); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_DECREF(tuple); - Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); return result; } @@ -3777,7 +3829,7 @@ SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObje assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); result = wrapper(a, tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -3791,7 +3843,7 @@ SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, P PyObject *arg, *result; arg = _PyLong_FromSsize_t(b); result = wrapper(a, arg); - Py_DECREF(arg); + SWIG_Py_DECREF(arg); return result; } @@ -3808,13 +3860,13 @@ SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a assert(tuple); PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3830,12 +3882,12 @@ SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyO PyObject *tuple; tuple = PyTuple_New(1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); pyresult = wrapper(a, tuple); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); - Py_DECREF(tuple); + SWIG_Py_XDECREF(pyresult); + SWIG_Py_DECREF(tuple); return result; } @@ -3850,7 +3902,7 @@ SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject PyObject *pyresult; pyresult = wrapper(a, b); result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1; - Py_XDECREF(pyresult); + SWIG_Py_XDECREF(pyresult); return result; } @@ -3865,16 +3917,16 @@ SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, int result; tuple = PyTuple_New(c ? 2 : 1); assert(tuple); - Py_INCREF(b); + SWIG_Py_INCREF(b); PyTuple_SET_ITEM(tuple, 0, b); if (c) { - Py_INCREF(c); + SWIG_Py_INCREF(c); PyTuple_SET_ITEM(tuple, 1, c); } resultobj = wrapper(a, tuple); result = resultobj ? 0 : -1; - Py_XDECREF(resultobj); - Py_DECREF(tuple); + SWIG_Py_XDECREF(resultobj); + SWIG_Py_DECREF(tuple); return result; } @@ -3901,7 +3953,7 @@ SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { if (!pyresult) return -1; result = SWIG_PyNumber_AsPyHash(pyresult); - Py_DECREF(pyresult); + SWIG_Py_DECREF(pyresult); return result; } @@ -4012,7 +4064,6 @@ static swig_module_info swig_module = {swig_types, 58, 0, 0, 0, 0}; # define SWIG_init init_xmp #endif -#define SWIG_name "_xmp" #ifdef __cplusplus #include @@ -4082,7 +4133,7 @@ namespace swig { SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4090,7 +4141,7 @@ namespace swig { { if (initial_ref) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(_obj); + SWIG_Py_XINCREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } } @@ -4098,8 +4149,8 @@ namespace swig { SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XINCREF(item._obj); - Py_XDECREF(_obj); + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); _obj = item._obj; SWIG_PYTHON_THREAD_END_BLOCK; return *this; @@ -4108,7 +4159,7 @@ namespace swig { ~SwigPtr_PyObject() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -4131,7 +4182,7 @@ namespace swig { SwigVar_PyObject & operator = (PyObject* obj) { - Py_XDECREF(_obj); + SWIG_Py_XDECREF(_obj); _obj = obj; return *this; } @@ -4145,11 +4196,9 @@ namespace swig { SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { - static int init = 0; static swig_type_info* info = 0; - if (!init) { + if (!info) { info = SWIG_TypeQuery("_p_char"); - init = 1; } return info; } @@ -4306,7 +4355,7 @@ static void _set_python_exception() { Py_DECREF(args); } - /*@SWIG:/usr/local/share/swig/4.2.1/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ + /*@SWIG:/usr/local/share/swig/4.3.0/typemaps/exception.swg,59,SWIG_CATCH_STDEXCEPT@*/ /* catching std::exception */ catch (std::invalid_argument& e) { SWIG_exception_fail(SWIG_ValueError, e.what() ); } catch (std::domain_error& e) { @@ -4433,7 +4482,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) #endif if (cptr) *cptr = cstr; if (psize) *psize = len + 1; - Py_XDECREF(bytes); + SWIG_Py_XDECREF(bytes); return ret; } else { #if defined(SWIG_PYTHON_2_UNICODE) @@ -4456,10 +4505,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) } if (psize) *psize = len + 1; - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); return SWIG_OK; } else { - Py_XDECREF(obj); + SWIG_Py_XDECREF(obj); } } #endif @@ -4494,12 +4543,8 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) return SWIG_OLDOBJ; } } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); @@ -5331,7 +5376,7 @@ SwigPython_std_pair_repr (PyObject *o) PyTuple_SET_ITEM(tuple, 0, PyObject_GetAttrString(o, (char*) "first")); PyTuple_SET_ITEM(tuple, 1, PyObject_GetAttrString(o, (char*) "second")); PyObject *result = PyObject_Repr(tuple); - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -5607,7 +5652,7 @@ SWIGINTERN PyObject *_wrap_XmpData_iterator_base___eq__(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData_iterator_base___eq__" "', argument " "2"" of type '" "XmpData_iterator_base const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData_iterator_base___eq__" "', argument " "2"" of type '" "XmpData_iterator_base const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData_iterator_base___eq__" "', argument " "2"" of type '" "XmpData_iterator_base const &""'"); } arg2 = reinterpret_cast< XmpData_iterator_base * >(argp2); result = (bool)((XmpData_iterator_base const *)arg1)->operator ==((XmpData_iterator_base const &)*arg2); @@ -5618,7 +5663,7 @@ SWIGINTERN PyObject *_wrap_XmpData_iterator_base___eq__(PyObject *self, PyObject return NULL; } PyErr_Clear(); - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } @@ -5645,7 +5690,7 @@ SWIGINTERN PyObject *_wrap_XmpData_iterator_base___ne__(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData_iterator_base___ne__" "', argument " "2"" of type '" "XmpData_iterator_base const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData_iterator_base___ne__" "', argument " "2"" of type '" "XmpData_iterator_base const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData_iterator_base___ne__" "', argument " "2"" of type '" "XmpData_iterator_base const &""'"); } arg2 = reinterpret_cast< XmpData_iterator_base * >(argp2); result = (bool)((XmpData_iterator_base const *)arg1)->operator !=((XmpData_iterator_base const &)*arg2); @@ -5656,7 +5701,7 @@ SWIGINTERN PyObject *_wrap_XmpData_iterator_base___ne__(PyObject *self, PyObject return NULL; } PyErr_Clear(); - Py_INCREF(Py_NotImplemented); + SWIG_Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } @@ -5843,7 +5888,7 @@ SWIGINTERN PyObject *_wrap_XmpData_iterator_setValue__SWIG_1(PyObject *self, PyO SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData_iterator_setValue" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData_iterator_setValue" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData_iterator_setValue" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -6473,7 +6518,7 @@ SWIGINTERN PyObject *_wrap_XmpData_iterator_toString__SWIG_1(PyObject *self, PyO arg2 = static_cast< size_t >(val2); { try { - result = (*arg1)->toString(arg2); + result = (*arg1)->toString(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -6551,7 +6596,7 @@ SWIGINTERN PyObject *_wrap_XmpData_iterator_toInt64(PyObject *self, PyObject *ar } { try { - result = (int64_t)(*arg1)->toInt64(arg2); + result = (int64_t)(*arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -6594,7 +6639,7 @@ SWIGINTERN PyObject *_wrap_XmpData_iterator_toFloat(PyObject *self, PyObject *ar } { try { - result = (float)(*arg1)->toFloat(arg2); + result = (float)(*arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -6637,7 +6682,7 @@ SWIGINTERN PyObject *_wrap_XmpData_iterator_toRational(PyObject *self, PyObject } { try { - result = (*arg1)->toRational(arg2); + result = (*arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -7016,7 +7061,7 @@ SWIGINTERN PyObject *_wrap_XmpData_iterator_toUint32(PyObject *self, PyObject *a } { try { - result = (uint32_t)(*arg1)->toUint32(arg2); + result = (uint32_t)(*arg1)->toUint32(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -7051,7 +7096,7 @@ SWIGINTERN int _wrap_new_Xmpdatum__SWIG_0(PyObject *self, PyObject *args, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Xmpdatum" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Xmpdatum" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_Xmpdatum" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } arg1 = reinterpret_cast< Exiv2::XmpKey * >(argp1); res2 = SWIG_ConvertPtr(obj2, &argp2,SWIGTYPE_p_Exiv2__Value, 0 | 0 ); @@ -7090,7 +7135,7 @@ SWIGINTERN int _wrap_new_Xmpdatum__SWIG_1(PyObject *self, PyObject *args, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Xmpdatum" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Xmpdatum" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_Xmpdatum" "', argument " "1"" of type '" "Exiv2::XmpKey const &""'"); } arg1 = reinterpret_cast< Exiv2::XmpKey * >(argp1); { @@ -7124,7 +7169,7 @@ SWIGINTERN int _wrap_new_Xmpdatum__SWIG_2(PyObject *self, PyObject *args, PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Xmpdatum" "', argument " "1"" of type '" "Exiv2::Xmpdatum const &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Xmpdatum" "', argument " "1"" of type '" "Exiv2::Xmpdatum const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_Xmpdatum" "', argument " "1"" of type '" "Exiv2::Xmpdatum const &""'"); } arg1 = reinterpret_cast< Exiv2::Xmpdatum * >(argp1); { @@ -7277,7 +7322,7 @@ SWIGINTERN PyObject *_wrap_Xmpdatum_setValue__SWIG_1(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Xmpdatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Xmpdatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "Xmpdatum_setValue" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -7821,7 +7866,7 @@ SWIGINTERN PyObject *_wrap_Xmpdatum_toString__SWIG_1(PyObject *self, PyObject *a arg2 = static_cast< size_t >(val2); { try { - result = ((Exiv2::Xmpdatum const *)arg1)->toString(arg2); + result = ((Exiv2::Xmpdatum const *)arg1)->toString(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -7899,7 +7944,7 @@ SWIGINTERN PyObject *_wrap_Xmpdatum_toInt64(PyObject *self, PyObject *args) { } { try { - result = (int64_t)((Exiv2::Xmpdatum const *)arg1)->toInt64(arg2); + result = (int64_t)((Exiv2::Xmpdatum const *)arg1)->toInt64(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -7942,7 +7987,7 @@ SWIGINTERN PyObject *_wrap_Xmpdatum_toFloat(PyObject *self, PyObject *args) { } { try { - result = (float)((Exiv2::Xmpdatum const *)arg1)->toFloat(arg2); + result = (float)((Exiv2::Xmpdatum const *)arg1)->toFloat(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -7985,7 +8030,7 @@ SWIGINTERN PyObject *_wrap_Xmpdatum_toRational(PyObject *self, PyObject *args) { } { try { - result = ((Exiv2::Xmpdatum const *)arg1)->toRational(arg2); + result = ((Exiv2::Xmpdatum const *)arg1)->toRational(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -8428,7 +8473,7 @@ SWIGINTERN PyObject *_wrap_XmpData_add__SWIG_0(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData_add" "', argument " "2"" of type '" "Exiv2::XmpKey const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData_add" "', argument " "2"" of type '" "Exiv2::XmpKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData_add" "', argument " "2"" of type '" "Exiv2::XmpKey const &""'"); } arg2 = reinterpret_cast< Exiv2::XmpKey * >(argp2); res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__Value, 0 | 0 ); @@ -8474,7 +8519,7 @@ SWIGINTERN PyObject *_wrap_XmpData_add__SWIG_1(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData_add" "', argument " "2"" of type '" "Exiv2::Xmpdatum const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData_add" "', argument " "2"" of type '" "Exiv2::Xmpdatum const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData_add" "', argument " "2"" of type '" "Exiv2::Xmpdatum const &""'"); } arg2 = reinterpret_cast< Exiv2::Xmpdatum * >(argp2); { @@ -8552,13 +8597,13 @@ SWIGINTERN PyObject *_wrap_XmpData_erase(PyObject *self, PyObject *args) { ; } if (!argp) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData_erase" "', argument " "2"" of type '" "XmpData_iterator_base""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData_erase" "', argument " "2"" of type '" "XmpData_iterator_base""'"); } arg2 = **argp; } { try { - result = (arg1)->erase(arg2); + result = (arg1)->erase(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -8608,7 +8653,7 @@ SWIGINTERN PyObject *_wrap_XmpData_eraseFamily(PyObject *self, PyObject *args) { ; } if (!argp) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData_eraseFamily" "', argument " "2"" of type '" "XmpData_iterator_base""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData_eraseFamily" "', argument " "2"" of type '" "XmpData_iterator_base""'"); } it2 = **argp; arg2 = &it2; @@ -8765,7 +8810,7 @@ SWIGINTERN PyObject *_wrap_XmpData_findKey(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData_findKey" "', argument " "2"" of type '" "Exiv2::XmpKey const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData_findKey" "', argument " "2"" of type '" "Exiv2::XmpKey const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData_findKey" "', argument " "2"" of type '" "Exiv2::XmpKey const &""'"); } arg2 = reinterpret_cast< Exiv2::XmpKey * >(argp2); { @@ -8965,7 +9010,7 @@ SWIGINTERN PyObject *_wrap_XmpData_setPacket(PyObject *self, PyObject *args) { } { try { - (arg1)->setPacket(arg2); + (arg1)->setPacket(SWIG_STD_MOVE(arg2)); } catch(std::exception const& e) { _set_python_exception(); @@ -9031,7 +9076,7 @@ SWIGINTERN PyObject *_wrap_XmpData___getitem__(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData___getitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData___getitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData___getitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9086,7 +9131,7 @@ SWIGINTERN PyObject *_wrap_XmpData___setitem____SWIG_0(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9139,7 +9184,7 @@ SWIGINTERN PyObject *_wrap_XmpData___setitem____SWIG_1(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9150,7 +9195,7 @@ SWIGINTERN PyObject *_wrap_XmpData___setitem____SWIG_1(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "XmpData___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData___setitem__" "', argument " "3"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData___setitem__" "', argument " "3"" of type '" "std::string const &""'"); } arg3 = ptr; } @@ -9199,7 +9244,7 @@ SWIGINTERN PyObject *_wrap_XmpData___setitem____SWIG_2(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9245,7 +9290,7 @@ SWIGINTERN PyObject *_wrap_XmpData___setitem____SWIG_3(PyObject *self, PyObject SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData___setitem__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9350,7 +9395,7 @@ SWIGINTERN PyObject *_wrap_XmpData___contains__(PyObject *self, PyObject *args) SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XmpData___contains__" "', argument " "2"" of type '" "std::string const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XmpData___contains__" "', argument " "2"" of type '" "std::string const &""'"); + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "XmpData___contains__" "', argument " "2"" of type '" "std::string const &""'"); } arg2 = ptr; } @@ -9625,7 +9670,7 @@ SwigPyBuiltin__XmpData_iterator_base_richcompare(PyObject *self, PyObject *other PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); switch (op) { case Py_EQ : result = _wrap_XmpData_iterator_base___eq__(self, tuple); break; case Py_NE : result = _wrap_XmpData_iterator_base___ne__(self, tuple); break; @@ -9636,10 +9681,10 @@ SwigPyBuiltin__XmpData_iterator_base_richcompare(PyObject *self, PyObject *other result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -9652,42 +9697,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__XmpData_iterator_base_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__XmpData_iterator_base_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.xmp.XmpData_iterator_base", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_XmpData_iterator_base_destructor_closure, /* tp_dealloc */ + "exiv2.xmp.XmpData_iterator_base", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_XmpData_iterator_base_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__XmpData_iterator_base_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__XmpData_iterator_base_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__XmpData_iterator_base_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - _wrap_XmpData_iterator_base___str___reprfunc_closure, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__XmpData_iterator_base_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__XmpData_iterator_base_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__XmpData_iterator_base_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__XmpData_iterator_base_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + _wrap_XmpData_iterator_base___str___reprfunc_closure, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__XmpData_iterator_base_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -9695,176 +9741,295 @@ static PyHeapTypeObject SwigPyBuiltin__XmpData_iterator_base_type = { "\n" "Python wrapper for an :class:`XmpData` iterator that points to\n" "the 'end' value and can not be dereferenced.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__XmpData_iterator_base_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_XmpData_iterator_base___iter___getiterfunc_closure, /* tp_iter */ - _wrap_XmpData_iterator_base___next___iternextfunc_closure, /* tp_iternext */ - SwigPyBuiltin__XmpData_iterator_base_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__XmpData_iterator_base_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__XmpData_iterator_base_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_XmpData_iterator_base___iter___getiterfunc_closure, /* tp_iter */ + _wrap_XmpData_iterator_base___next___iternextfunc_closure, /* tp_iternext */ + SwigPyBuiltin__XmpData_iterator_base_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__XmpData_iterator_base_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__XmpData_iterator_base_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__XmpData_iterator_base_type}; +static PyTypeObject *SwigPyBuiltin__XmpData_iterator_base_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__XmpData_iterator_base_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpData_iterator_base'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__XmpData_iterator_base_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete_XmpData_iterator_base_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "\n" + "Python wrapper for an :class:`XmpData` iterator that points to\n" + "the 'end' value and can not be dereferenced.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)_wrap_XmpData_iterator_base___str___reprfunc_closure }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__XmpData_iterator_base_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__XmpData_iterator_base_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__XmpData_iterator_base_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)_wrap_XmpData_iterator_base___iter___getiterfunc_closure }, + { Py_tp_iternext, (void *)_wrap_XmpData_iterator_base___next___iternextfunc_closure }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.xmp.XmpData_iterator_base", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__XmpData_iterator_base_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet XmpData_iterator___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__XmpData_iterator_getset[] = { @@ -9878,7 +10043,7 @@ SwigPyBuiltin__XmpData_iterator_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); switch (op) { case Py_EQ : result = _wrap_XmpData_iterator_base___eq__(self, tuple); break; case Py_NE : result = _wrap_XmpData_iterator_base___ne__(self, tuple); break; @@ -9889,17 +10054,17 @@ SwigPyBuiltin__XmpData_iterator_richcompare(PyObject *self, PyObject *other, int result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } SWIGINTERN PyMethodDef SwigPyBuiltin__XmpData_iterator_methods[] = { { "__deref__", _wrap_XmpData_iterator___deref__, METH_VARARGS, "" }, { "setValue", _wrap_XmpData_iterator_setValue, METH_VARARGS, "" }, - { "copy", _wrap_XmpData_iterator_copy, METH_VARARGS, " Not implemented. Calling this method will raise an exception." }, + { "copy", _wrap_XmpData_iterator_copy, METH_VARARGS, "Not implemented. Calling this method will raise an exception." }, { "write", _wrap_XmpData_iterator_write, METH_VARARGS, "" }, { "key", _wrap_XmpData_iterator_key, METH_VARARGS, "\n" "Return the key of the Xmpdatum. The key is of the form\n" @@ -9908,14 +10073,14 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__XmpData_iterator_methods[] = { " contain multiple metadata with the same key.\n" "" }, { "familyName", _wrap_XmpData_iterator_familyName, METH_VARARGS, "" }, - { "groupName", _wrap_XmpData_iterator_groupName, METH_VARARGS, " Return the (preferred) schema namespace prefix." }, - { "tagName", _wrap_XmpData_iterator_tagName, METH_VARARGS, " Return the property name." }, + { "groupName", _wrap_XmpData_iterator_groupName, METH_VARARGS, "Return the (preferred) schema namespace prefix." }, + { "tagName", _wrap_XmpData_iterator_tagName, METH_VARARGS, "Return the property name." }, { "tagLabel", _wrap_XmpData_iterator_tagLabel, METH_VARARGS, "" }, { "tagDesc", _wrap_XmpData_iterator_tagDesc, METH_VARARGS, "" }, - { "tag", _wrap_XmpData_iterator_tag, METH_VARARGS, " Properties don't have a tag number. Return 0." }, + { "tag", _wrap_XmpData_iterator_tag, METH_VARARGS, "Properties don't have a tag number. Return 0." }, { "typeId", _wrap_XmpData_iterator_typeId, METH_VARARGS, "" }, { "typeName", _wrap_XmpData_iterator_typeName, METH_VARARGS, "" }, - { "typeSize", _wrap_XmpData_iterator_typeSize, METH_VARARGS, " The Exif typeSize doesn't make sense here. Return 0." }, + { "typeSize", _wrap_XmpData_iterator_typeSize, METH_VARARGS, "The Exif typeSize doesn't make sense here. Return 0." }, { "count", _wrap_XmpData_iterator_count, METH_VARARGS, "" }, { "size", _wrap_XmpData_iterator_size, METH_VARARGS, "" }, { "toString", _wrap_XmpData_iterator_toString, METH_VARARGS, "" }, @@ -9930,46 +10095,47 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__XmpData_iterator_methods[] = { "\n" "Implemented in terms of write(), see there.\n" "" }, - { "toUint32", _wrap_XmpData_iterator_toUint32, METH_VARARGS, " Return the **n**-th component of the value converted to uint32_t." }, + { "toUint32", _wrap_XmpData_iterator_toUint32, METH_VARARGS, "Return the **n**-th component of the value converted to uint32_t." }, { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__XmpData_iterator_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.xmp.XmpData_iterator", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_XmpData_iterator_destructor_closure, /* tp_dealloc */ + "exiv2.xmp.XmpData_iterator", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_XmpData_iterator_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__XmpData_iterator_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__XmpData_iterator_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__XmpData_iterator_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__XmpData_iterator_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__XmpData_iterator_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__XmpData_iterator_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__XmpData_iterator_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__XmpData_iterator_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -9978,176 +10144,296 @@ static PyHeapTypeObject SwigPyBuiltin__XmpData_iterator_type = { "Python wrapper for an :class:`XmpData` iterator. It has most of\n" "the methods of :class:`Xmpdatum` allowing easy access to the\n" "data it points to.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__XmpData_iterator_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__XmpData_iterator_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__XmpData_iterator_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__XmpData_iterator_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__XmpData_iterator_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__XmpData_iterator_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__XmpData_iterator_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__XmpData_iterator_type}; +static PyTypeObject *SwigPyBuiltin__XmpData_iterator_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__XmpData_iterator_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpData_iterator'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__XmpData_iterator_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)SwigPyBuiltin_BadInit }, + { Py_tp_dealloc, (void *)_wrap_delete_XmpData_iterator_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "\n" + "Python wrapper for an :class:`XmpData` iterator. It has most of\n" + "the methods of :class:`Xmpdatum` allowing easy access to the\n" + "data it points to.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__XmpData_iterator_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__XmpData_iterator_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__XmpData_iterator_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.xmp.XmpData_iterator", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__XmpData_iterator_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet Xmpdatum___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__Xmpdatum_getset[] = { @@ -10181,22 +10467,22 @@ SwigPyBuiltin__Exiv2__Xmpdatum_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Xmpdatum_methods[] = { { "setValue", _wrap_Xmpdatum_setValue, METH_VARARGS, "" }, - { "copy", _wrap_Xmpdatum_copy, METH_VARARGS, " Not implemented. Calling this method will raise an exception." }, + { "copy", _wrap_Xmpdatum_copy, METH_VARARGS, "Not implemented. Calling this method will raise an exception." }, { "write", _wrap_Xmpdatum_write, METH_VARARGS, "" }, { "key", _wrap_Xmpdatum_key, METH_VARARGS, "\n" "Return the key of the Xmpdatum. The key is of the form\n" @@ -10205,14 +10491,14 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Xmpdatum_methods[] = { " contain multiple metadata with the same key.\n" "" }, { "familyName", _wrap_Xmpdatum_familyName, METH_VARARGS, "" }, - { "groupName", _wrap_Xmpdatum_groupName, METH_VARARGS, " Return the (preferred) schema namespace prefix." }, - { "tagName", _wrap_Xmpdatum_tagName, METH_VARARGS, " Return the property name." }, + { "groupName", _wrap_Xmpdatum_groupName, METH_VARARGS, "Return the (preferred) schema namespace prefix." }, + { "tagName", _wrap_Xmpdatum_tagName, METH_VARARGS, "Return the property name." }, { "tagLabel", _wrap_Xmpdatum_tagLabel, METH_VARARGS, "" }, { "tagDesc", _wrap_Xmpdatum_tagDesc, METH_VARARGS, "" }, - { "tag", _wrap_Xmpdatum_tag, METH_VARARGS, " Properties don't have a tag number. Return 0." }, + { "tag", _wrap_Xmpdatum_tag, METH_VARARGS, "Properties don't have a tag number. Return 0." }, { "typeId", _wrap_Xmpdatum_typeId, METH_VARARGS, "" }, { "typeName", _wrap_Xmpdatum_typeName, METH_VARARGS, "" }, - { "typeSize", _wrap_Xmpdatum_typeSize, METH_VARARGS, " The Exif typeSize doesn't make sense here. Return 0." }, + { "typeSize", _wrap_Xmpdatum_typeSize, METH_VARARGS, "The Exif typeSize doesn't make sense here. Return 0." }, { "count", _wrap_Xmpdatum_count, METH_VARARGS, "" }, { "size", _wrap_Xmpdatum_size, METH_VARARGS, "" }, { "toString", _wrap_Xmpdatum_toString, METH_VARARGS, "" }, @@ -10225,222 +10511,341 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Xmpdatum_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__Xmpdatum_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.xmp.Xmpdatum", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ + "exiv2.xmp.Xmpdatum", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ _wrap_delete_Xmpdatum_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__Xmpdatum_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__Xmpdatum_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__Xmpdatum_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__Xmpdatum_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__Xmpdatum_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__Xmpdatum_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__Xmpdatum_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__Xmpdatum_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" "Information related to an XMP property. An XMP metadatum consists\n" " of an XmpKey and a Value and provides methods to manipulate these.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__Xmpdatum_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__Xmpdatum_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__Xmpdatum_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_Xmpdatum, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__Xmpdatum_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__Xmpdatum_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__Xmpdatum_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_Xmpdatum, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Xmpdatum_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__Xmpdatum_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__Xmpdatum_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Xmpdatum_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Xmpdatum'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__Xmpdatum_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_Xmpdatum }, + { Py_tp_dealloc, (void *)_wrap_delete_Xmpdatum_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Information related to an XMP property. An XMP metadatum consists\n" + " of an XmpKey and a Value and provides methods to manipulate these.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__Xmpdatum_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__Xmpdatum_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__Xmpdatum_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.xmp.Xmpdatum", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Xmpdatum_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet XmpData___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XmpData_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Default constructor", &XmpData___dict___getset }, + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"Default constructor", &XmpData___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -10450,16 +10855,16 @@ SwigPyBuiltin__Exiv2__XmpData_richcompare(PyObject *self, PyObject *other, int o PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -10486,16 +10891,16 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpData_methods[] = { " erases all following keys from the same family\n" " See: https://github.com/Exiv2/exiv2/issues/521\n" "" }, - { "clear", _wrap_XmpData_clear, METH_VARARGS, " Delete all Xmpdatum instances resulting in an empty container." }, - { "sortByKey", _wrap_XmpData_sortByKey, METH_VARARGS, " Sort metadata by key" }, - { "begin", _wrap_XmpData_begin, METH_VARARGS, " Begin of the metadata" }, - { "end", _wrap_XmpData_end, METH_VARARGS, " End of the metadata" }, + { "clear", _wrap_XmpData_clear, METH_VARARGS, "Delete all Xmpdatum instances resulting in an empty container." }, + { "sortByKey", _wrap_XmpData_sortByKey, METH_VARARGS, "Sort metadata by key" }, + { "begin", _wrap_XmpData_begin, METH_VARARGS, "Begin of the metadata" }, + { "end", _wrap_XmpData_end, METH_VARARGS, "End of the metadata" }, { "findKey", _wrap_XmpData_findKey, METH_VARARGS, "\n" "Find the first Xmpdatum with the given key, return an iterator\n" " to it.\n" "" }, - { "empty", _wrap_XmpData_empty, METH_VARARGS, " Return true if there is no XMP metadata" }, - { "count", _wrap_XmpData_count, METH_VARARGS, " Get the number of metadata entries" }, + { "empty", _wrap_XmpData_empty, METH_VARARGS, "Return true if there is no XMP metadata" }, + { "count", _wrap_XmpData_count, METH_VARARGS, "Get the number of metadata entries" }, { "usePacket", _wrap_XmpData_usePacket, METH_VARARGS, "\n" "*Overload 1:*\n" "are we to use the packet?\n" @@ -10505,7 +10910,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpData_methods[] = { "*Overload 2:*\n" "set usePacket_\n" "" }, - { "setPacket", _wrap_XmpData_setPacket, METH_VARARGS, " setPacket" }, + { "setPacket", _wrap_XmpData_setPacket, METH_VARARGS, "setPacket" }, { "xmpPacket", _wrap_XmpData_xmpPacket, METH_VARARGS, "" }, { "__getitem__", _wrap_XmpData___getitem__, METH_VARARGS, "" }, { "__setitem__", _wrap_XmpData___setitem__, METH_VARARGS, "" }, @@ -10513,42 +10918,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpData_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpData_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.xmp.XmpData", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_XmpData_destructor_closure, /* tp_dealloc */ + "exiv2.xmp.XmpData", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_XmpData_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XmpData_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XmpData_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XmpData_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XmpData_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__XmpData_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__XmpData_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__XmpData_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__XmpData_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -10561,176 +10967,300 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpData_type = { "- access metadata through keys and standard C++ iterators\n" "- add, modify and delete metadata\n" "- serialize XMP data to an XML block\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__XmpData_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - _wrap_XmpData_begin_getiterfunc_closure, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XmpData_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XmpData_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_XmpData, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__XmpData_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + _wrap_XmpData_begin_getiterfunc_closure, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__XmpData_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__XmpData_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_XmpData, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - _wrap_XmpData_count_lenfunc_closure, /* mp_length */ - _wrap_XmpData___getitem___binaryfunc_closure, /* mp_subscript */ - _wrap_XmpData___setitem___objobjargproc_closure, /* mp_ass_subscript */ + _wrap_XmpData_count_lenfunc_closure, /* mp_length */ + _wrap_XmpData___getitem___binaryfunc_closure, /* mp_subscript */ + _wrap_XmpData___setitem___objobjargproc_closure, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - _wrap_XmpData___contains___objobjproc_closure, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + _wrap_XmpData___contains___objobjproc_closure, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpData_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpData_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpData_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpData_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpData'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpData_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_XmpData }, + { Py_tp_dealloc, (void *)_wrap_delete_XmpData_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "A container for XMP data. This is a top-level class of\n" + " the %Exiv2 library.\n" + "\n" + "Provide high-level access to the XMP data of an image:\n" + "- read XMP information from an XML block\n" + "- access metadata through keys and standard C++ iterators\n" + "- add, modify and delete metadata\n" + "- serialize XMP data to an XML block\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__XmpData_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__XmpData_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__XmpData_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)_wrap_XmpData_count_lenfunc_closure }, + { Py_mp_subscript, (void *)_wrap_XmpData___getitem___binaryfunc_closure }, + { Py_mp_ass_subscript, (void *)_wrap_XmpData___setitem___objobjargproc_closure }, + { Py_tp_iter, (void *)_wrap_XmpData_begin_getiterfunc_closure }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)_wrap_XmpData___contains___objobjproc_closure }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.xmp.XmpData", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpData_clientdata = {0, 0, 0, 0, 0, 0, 0}; static SwigPyGetSet XmpParser___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XmpParser_getset[] = { @@ -10794,16 +11324,16 @@ SwigPyBuiltin__Exiv2__XmpParser_richcompare(PyObject *self, PyObject *other, int PyObject *tuple = PyTuple_New(1); assert(tuple); PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); + SWIG_Py_XINCREF(other); if (!result && !PyErr_Occurred()) { if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); } else { result = Py_NotImplemented; - Py_INCREF(result); + SWIG_Py_INCREF(result); } } - Py_DECREF(tuple); + SWIG_Py_DECREF(tuple); return result; } @@ -10868,42 +11398,43 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpParser_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; +#ifndef SWIG_HEAPTYPES static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpParser_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) #else PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ + 0, /* ob_size */ #endif - "exiv2.xmp.XmpParser", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_XmpParser_destructor_closure,/* tp_dealloc */ + "exiv2.xmp.XmpParser", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_XmpParser_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ + (printfunc) 0, /* tp_print */ #else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ + (Py_ssize_t) 0, /* tp_vectorcall_offset */ #endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ + 0, /* tp_compare */ #else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XmpParser_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XmpParser_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XmpParser_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XmpParser_type.as_buffer, /* tp_as_buffer */ + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__XmpParser_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__XmpParser_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__XmpParser_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__XmpParser_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif @@ -10911,176 +11442,295 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__XmpParser_type = { "Stateless parser class for XMP packets. Images use this\n" " class to parse and serialize XMP packets. The parser uses\n" " the XMP toolkit to do the job.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__XmpParser_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XmpParser_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XmpParser_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_XmpParser, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ + "", /* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__XmpParser_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__XmpParser_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__XmpParser_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_XmpParser, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ #if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ + (destructor) 0, /* tp_finalize */ #endif #if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ + (vectorcallfunc) 0, /* tp_vectorcall */ #endif #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ + 0, /* tp_print */ #endif #if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ + (unsigned char) 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + (uint16_t) 0, /* tp_versions_used */ #endif #ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ #endif }, #if PY_VERSION_HEX >= 0x03050000 { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ # if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ + (sendfunc) 0, /* am_send */ # endif }, #endif { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ #if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ + (coercion) 0, /* nb_coerce */ #endif - (unaryfunc) 0, /* nb_int */ + (unaryfunc) 0, /* nb_int */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ + (void *) 0, /* nb_reserved */ #else - (unaryfunc) 0, /* nb_long */ + (unaryfunc) 0, /* nb_long */ #endif - (unaryfunc) 0, /* nb_float */ + (unaryfunc) 0, /* nb_float */ #if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ #endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ #if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ #if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ #endif }, { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ + (void *) 0, /* was_sq_slice */ #else - (ssizessizeargfunc) 0, /* sq_slice */ + (ssizessizeargfunc) 0, /* sq_slice */ #endif - (ssizeobjargproc) 0, /* sq_ass_item */ + (ssizeobjargproc) 0, /* sq_ass_item */ #if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ + (void *) 0, /* was_sq_ass_slice */ #else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ + (ssizessizeobjargproc) 0, /* sq_ass_slice */ #endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ }, { #if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ #if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ #endif #if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ + (PyObject *) 0, /* ht_module */ #endif #if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ + (char *) 0, /* _ht_tpname */ { - (PyObject *) 0, /* getitem */ + (PyObject *) 0, /* getitem */ #if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ + (uint32_t) 0, /* getitem_version */ +#endif +#if PY_VERSION_HEX >= 0x030d0000 + (PyObject *) 0, /* init */ #endif } #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpParser_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpParser_type}; +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpParser_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyObject *tuple_bases; + PyTypeObject *pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpParser_type; + pytype->tp_dict = dict; + SwigPyBuiltin_SetMetaType(pytype, type); + pytype->tp_new = PyType_GenericNew; + tuple_bases = SwigPyBuiltin_InitBases(bases); + pytype->tp_base = bases[0]; + SWIG_Py_INCREF(pytype->tp_base); + pytype->tp_bases = tuple_bases; + if (PyType_Ready(pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpParser'."); + return NULL; + } + return pytype; +} + +#else +static PyTypeObject *SwigPyBuiltin__Exiv2__XmpParser_type_create(PyTypeObject *type, PyTypeObject **bases, PyObject *dict) { + PyMemberDef members[] = { + { (char *)"__dictoffset__", Py_T_PYSSIZET, offsetof(SwigPyObject, dict), Py_READONLY, NULL }, + { NULL, 0, 0, 0, NULL } + }; + PyType_Slot slots[] = { + { Py_tp_init, (void *)_wrap_new_XmpParser }, + { Py_tp_dealloc, (void *)_wrap_delete_XmpParser_destructor_closure }, + { Py_tp_alloc, (void *)(allocfunc) 0 }, + { Py_tp_free, (void *)(freefunc) 0 }, + { Py_tp_is_gc, (void *)(inquiry) 0 }, + { Py_tp_del, (void *)(destructor) 0 }, + { Py_tp_doc, (void *)"\n" + "Stateless parser class for XMP packets. Images use this\n" + " class to parse and serialize XMP packets. The parser uses\n" + " the XMP toolkit to do the job.\n" + "" }, + { Py_tp_repr, (void *)(reprfunc) 0 }, + { Py_tp_str, (void *)(reprfunc) 0 }, + { Py_tp_traverse, (void *)(traverseproc) 0 }, + { Py_tp_clear, (void *)(inquiry) 0 }, + { Py_tp_richcompare, (void *)SwigPyBuiltin__Exiv2__XmpParser_richcompare }, + { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__XmpParser_methods }, + { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__XmpParser_getset }, + { Py_tp_hash, (void *)SwigPyObject_hash }, + { Py_tp_call, (void *)(ternaryfunc) 0 }, + { Py_tp_getattro, (void *)(getattrofunc) 0 }, + { Py_tp_setattro, (void *)(setattrofunc) 0 }, + { Py_tp_descr_get, (void *)(descrgetfunc) 0 }, + { Py_tp_descr_set, (void *)(descrsetfunc) 0 }, + { Py_mp_length, (void *)(lenfunc) 0 }, + { Py_mp_subscript, (void *)(binaryfunc) 0 }, + { Py_mp_ass_subscript, (void *)(objobjargproc) 0 }, + { Py_tp_iter, (void *)(getiterfunc) 0 }, + { Py_tp_iternext, (void *)(iternextfunc) 0 }, + { Py_nb_add, (void *)(binaryfunc) 0 }, + { Py_nb_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_divmod, (void *)(binaryfunc) 0 }, + { Py_nb_power, (void *)(ternaryfunc) 0 }, + { Py_nb_negative, (void *)(unaryfunc) 0 }, + { Py_nb_positive, (void *)(unaryfunc) 0 }, + { Py_nb_absolute, (void *)(unaryfunc) 0 }, + { Py_nb_bool, (void *)(inquiry) 0 }, + { Py_nb_invert, (void *)(unaryfunc) 0 }, + { Py_nb_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_and, (void *)(binaryfunc) 0 }, + { Py_nb_xor, (void *)(binaryfunc) 0 }, + { Py_nb_or, (void *)(binaryfunc) 0 }, + { Py_nb_int, (void *)(unaryfunc) 0 }, + { Py_nb_float, (void *)(unaryfunc) 0 }, + { Py_nb_inplace_add, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_subtract, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_multiply, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_remainder, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_power, (void *)(ternaryfunc) 0 }, + { Py_nb_inplace_lshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_rshift, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_and, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_xor, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_or, (void *)(binaryfunc) 0 }, + { Py_nb_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_floor_divide, (void *)(binaryfunc) 0 }, + { Py_nb_inplace_true_divide, (void *)(binaryfunc) 0 }, + { Py_nb_index, (void *)(unaryfunc) 0 }, + { Py_sq_length, (void *)(lenfunc) 0 }, + { Py_sq_concat, (void *)(binaryfunc) 0 }, + { Py_sq_repeat, (void *)(ssizeargfunc) 0 }, + { Py_sq_item, (void *)(ssizeargfunc) 0 }, + { Py_sq_ass_item, (void *)(ssizeobjargproc) 0 }, + { Py_sq_contains, (void *)(objobjproc) 0 }, + { Py_sq_inplace_concat, (void *)(binaryfunc) 0 }, + { Py_sq_inplace_repeat, (void *)(ssizeargfunc) 0 }, + { Py_tp_members, members }, + { 0, NULL } + }; + PyType_Spec spec = { + "exiv2.xmp.XmpParser", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + PyObject *tuple_bases = SwigPyBuiltin_InitBases(bases); + PyTypeObject *pytype = (PyTypeObject*)PyType_FromSpecWithBases(&spec, tuple_bases); + PyDict_Merge(pytype->tp_dict, dict, 1); + SwigPyBuiltin_SetMetaType(pytype, type); + PyType_Modified(pytype); + Py_DECREF(dict); + return pytype; +} +#endif +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpParser_clientdata = {0, 0, 0, 0, 0, 0, 0}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ @@ -11683,7 +12333,7 @@ extern "C" { } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); + SWIG_Py_DECREF(obj); } } } @@ -11866,7 +12516,7 @@ SWIG_init(void) { (void)public_symbol; PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); + SWIG_Py_DECREF(public_interface); for (i = 0; SwigMethods[i].ml_name != NULL; ++i) SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); for (i = 0; swig_const_table[i].name != 0; ++i) @@ -11892,31 +12542,27 @@ SWIG_init(void) { /* type '::XmpData_iterator_base' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__XmpData_iterator_base_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpData_iterator_base'."); + builtin_pytype = SwigPyBuiltin__XmpData_iterator_base_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__XmpData_iterator_base_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpData_iterator_base", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpData_iterator_base"); d = md; /* type '::XmpData_iterator' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__XmpData_iterator_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); { PyObject* module = PyImport_ImportModule("enum"); @@ -11928,8 +12574,6 @@ SWIG_init(void) { return NULL; } - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_XmpData_iterator_base"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -11943,27 +12587,24 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpData_iterator'."); + builtin_pytype = SwigPyBuiltin__XmpData_iterator_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__XmpData_iterator_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpData_iterator", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpData_iterator"); d = md; /* type 'Exiv2::Xmpdatum' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Xmpdatum_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Metadatum"); if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { @@ -11977,48 +12618,44 @@ SWIG_init(void) { #endif } builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'Xmpdatum'."); + builtin_pytype = SwigPyBuiltin__Exiv2__Xmpdatum_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__Xmpdatum_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "Xmpdatum", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "Xmpdatum"); d = md; /* type 'Exiv2::XmpData' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpData_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; + d = PyDict_New(); builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpData'."); + builtin_pytype = SwigPyBuiltin__Exiv2__XmpData_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__XmpData_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpData", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpData"); d = md; /* type 'Exiv2::XmpParser' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XmpParser_type; - builtin_pytype->tp_dict = d = PyDict_New(); + d = PyDict_New(); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "omitPacketWrapper",SWIG_From_int(static_cast< int >(Exiv2::XmpParser::omitPacketWrapper))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "readOnlyPacket",SWIG_From_int(static_cast< int >(Exiv2::XmpParser::readOnlyPacket))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "useCompactFormat",SWIG_From_int(static_cast< int >(Exiv2::XmpParser::useCompactFormat))); @@ -12026,22 +12663,20 @@ SWIG_init(void) { SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "exactPacketLength",SWIG_From_int(static_cast< int >(Exiv2::XmpParser::exactPacketLength))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "writeAliasComments",SWIG_From_int(static_cast< int >(Exiv2::XmpParser::writeAliasComments))); SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "omitAllFormatting",SWIG_From_int(static_cast< int >(Exiv2::XmpParser::omitAllFormatting))); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpParser'."); + builtin_pytype = SwigPyBuiltin__Exiv2__XmpParser_type_create(metatype, builtin_bases, d); + if(!builtin_pytype) { #if PY_VERSION_HEX >= 0x03000000 return NULL; #else return; #endif } - Py_INCREF(builtin_pytype); + SwigPyBuiltin__Exiv2__XmpParser_clientdata.pytype = builtin_pytype; + SWIG_Py_INCREF((PyObject *)builtin_pytype); PyModule_AddObject(m, "XmpParser", (PyObject *)builtin_pytype); SwigPyBuiltin_AddPublicSymbol(public_interface, "XmpParser"); d = md; diff --git a/utils/build_swig.py b/utils/build_swig.py index 67b82cfd..323dab14 100644 --- a/utils/build_swig.py +++ b/utils/build_swig.py @@ -152,7 +152,7 @@ def main(): # Functions with just one parameter and a default value don't # work with fastunpack. # See https://github.com/swig/swig/issues/2786 - if swig_version < (4, 2, 2) and ext_name in ( + if swig_version < (4, 4, 0) and ext_name in ( 'basicio', 'exif', 'iptc', 'metadatum', 'value', 'xmp'): cmd.append('-nofastunpack') cmd += ['-o', os.path.join(output_dir, ext_name + '_wrap.cxx')] From 4799b1c5e4f0dd3f396521f80365d193582de40c Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Fri, 29 Nov 2024 08:24:57 +0000 Subject: [PATCH 3/4] Update GitHub actions cibuildwheel version --- .github/workflows/build-linux-28.yml | 2 +- .github/workflows/build-macos-28.yml | 2 +- .github/workflows/build-macos-arm-28.yml | 2 +- .github/workflows/build-windows-28.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-linux-28.yml b/.github/workflows/build-linux-28.yml index b4486b82..d61d6cf1 100644 --- a/.github/workflows/build-linux-28.yml +++ b/.github/workflows/build-linux-28.yml @@ -31,7 +31,7 @@ jobs: mv inih-r58 inih - name: Build wheels - uses: pypa/cibuildwheel@v2.16.5 + uses: pypa/cibuildwheel@v2.22.0 env: CIBW_ARCHS: auto64 CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 diff --git a/.github/workflows/build-macos-28.yml b/.github/workflows/build-macos-28.yml index 51dfad7b..46cc03ad 100644 --- a/.github/workflows/build-macos-28.yml +++ b/.github/workflows/build-macos-28.yml @@ -21,7 +21,7 @@ jobs: mv exiv2-0.28.3 libexiv2 - name: Build wheels - uses: pypa/cibuildwheel@v2.16.5 + uses: pypa/cibuildwheel@v2.22.0 env: CIBW_ARCHS: x86_64 CIBW_ENVIRONMENT: > diff --git a/.github/workflows/build-macos-arm-28.yml b/.github/workflows/build-macos-arm-28.yml index f8f3e977..13b1845a 100644 --- a/.github/workflows/build-macos-arm-28.yml +++ b/.github/workflows/build-macos-arm-28.yml @@ -21,7 +21,7 @@ jobs: mv exiv2-0.28.3 libexiv2 - name: Build wheels - uses: pypa/cibuildwheel@v2.16.5 + uses: pypa/cibuildwheel@v2.22.0 env: CIBW_ARCHS: arm64 CIBW_ENVIRONMENT: > diff --git a/.github/workflows/build-windows-28.yml b/.github/workflows/build-windows-28.yml index dfec3d7c..c04a4ed4 100644 --- a/.github/workflows/build-windows-28.yml +++ b/.github/workflows/build-windows-28.yml @@ -66,7 +66,7 @@ jobs: copy build-msvc\bin\libcurl.dll build-msvc\install\bin - name: Build wheels - uses: pypa/cibuildwheel@v2.16.5 + uses: pypa/cibuildwheel@v2.22.0 env: CIBW_ARCHS: auto64 CIBW_SKIP: pp3* From 08d7f773ee73427487e457b2a7673fd0a3e080b6 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Wed, 4 Dec 2024 16:10:49 +0000 Subject: [PATCH 4/4] Fix bug #44 The easy bit is to use fixed values for the date and time values tested, but I've also added a test for a date in 2039 if the libexiv2 version is greater than the current version. (I've submitted a fix to the exiv2 project which should be in the next releae.) --- tests/test_value.py | 80 ++++++++++++++++++++++++++++++--------------- 1 file changed, 54 insertions(+), 26 deletions(-) diff --git a/tests/test_value.py b/tests/test_value.py index 8166a8c5..9be93f0f 100644 --- a/tests/test_value.py +++ b/tests/test_value.py @@ -74,28 +74,39 @@ def do_common_tests(self, value, type_id, string, data, sequence=None): def do_conversion_tests(self, value, text, number): result = value.toFloat(0) - self.assertEqual(value.ok(), True) - self.assertIsInstance(result, float) - self.assertAlmostEqual(result, float(number), places=5) - self.assertEqual(value.toFloat(0), value.toFloat()) - if exiv2.testVersion(0, 28, 0): - self.check_result(value.toUint32(0), int, int(number)) + if value.ok(): self.assertEqual(value.ok(), True) - self.assertEqual(value.toUint32(0), value.toUint32()) - self.check_result(value.toInt64(0), int, int(number)) - self.assertEqual(value.toInt64(0), value.toInt64()) + self.assertIsInstance(result, float) + self.assertAlmostEqual(result, float(number), places=5) + self.assertEqual(value.toFloat(0), value.toFloat()) + if exiv2.testVersion(0, 28, 0): + result = value.toUint32(0) + if value.ok(): + self.assertEqual(value.ok(), True) + self.check_result(result, int, int(number)) + self.assertEqual(result, value.toUint32()) + result = value.toInt64(0) + if value.ok(): + self.assertEqual(value.ok(), True) + self.check_result(result, int, int(number)) + self.assertEqual(result, value.toInt64()) else: - self.check_result(value.toLong(0), int, int(number)) - self.assertEqual(value.toLong(0), value.toLong()) - self.assertEqual(value.ok(), True) + result = value.toLong(0) + if value.ok(): + self.assertEqual(value.ok(), True) + self.check_result(result, int, int(number)) + self.assertEqual(result, value.toLong()) result = value.toRational(0) - self.assertEqual(value.ok(), True) - self.assertIsInstance(result, tuple) - self.assertAlmostEqual( - float(Fraction(*result)), float(number), places=5) - self.assertEqual(value.toRational(0), value.toRational()) - self.check_result(value.toString(0), str, text) - self.assertEqual(value.ok(), True) + if value.ok(): + self.assertEqual(value.ok(), True) + self.assertIsInstance(result, tuple) + self.assertAlmostEqual( + float(Fraction(*result)), float(number), places=5) + self.assertEqual(value.toRational(0), value.toRational()) + result = value.toString(0) + if value.ok(): + self.assertEqual(value.ok(), True) + self.check_result(result, str, text) def do_dataarea_tests(self, value, has_dataarea=False): data_area = value.dataArea() @@ -346,8 +357,7 @@ def test_Date(self): self.assertEqual(dict(value), { 'year': today.year, 'month': today.month, 'day': today.day}) - def test_DateValue(self): - py_date = datetime.date.today() + def do_test_DateValue(self, py_date): data = bytes(py_date.strftime('%Y%m%d'), 'ascii') exiv_date = exiv2.Date() exiv_date.year = py_date.year @@ -378,6 +388,15 @@ def test_DateValue(self): self.do_conversion_tests(value, py_date.isoformat(), seconds) self.do_dataarea_tests(value) + def test_DateValue(self): + date = datetime.date(2024, 7, 4) + with self.subTest(date=date): + self.do_test_DateValue(date) + if exiv2.testVersion(0, 28, 4): + date = datetime.date(2039, 1, 1) + with self.subTest(date=date): + self.do_test_DateValue(date) + def test_Time(self): now = datetime.datetime.now().time() value = exiv2.Time() @@ -401,10 +420,7 @@ def test_Time(self): 'hour': now.hour, 'minute': now.minute, 'second': now.second, 'tzHour': 1, 'tzMinute': 30}) - def test_TimeValue(self): - py_tz = datetime.timezone(datetime.timedelta(hours=1, minutes=30)) - py_time = datetime.datetime.now().time() - py_time = py_time.replace(microsecond=0, tzinfo=py_tz) + def do_test_TimeValue(self, py_time): exiv_time = exiv2.Time() exiv_time.hour = py_time.hour exiv_time.minute = py_time.minute @@ -441,13 +457,25 @@ def test_TimeValue(self): value.setTime(py_time.hour, py_time.minute, py_time.second, 1, 30) self.assertEqual(str(value), py_time.isoformat()) seconds = (py_time.hour * 3600) + (py_time.minute * 60) + py_time.second - seconds -= 3600 + (30 * 60) + seconds -= py_time.tzinfo.utcoffset( + datetime.datetime.now()).total_seconds() + if seconds < 0: + seconds += 24 * 3600 value = exiv2.TimeValue() value.read(py_time.isoformat()) self.do_common_tests(value, exiv2.TypeId.time, py_time.isoformat(), data) self.do_conversion_tests(value, py_time.isoformat(), seconds) self.do_dataarea_tests(value) + def test_TimeValue(self): + py_tz = datetime.timezone(datetime.timedelta(hours=1, minutes=30)) + py_time = datetime.time(12, 34, 56, tzinfo=py_tz) + with self.subTest(time=py_time): + self.do_test_TimeValue(py_time) + py_time = py_time.replace(hour=0) + with self.subTest(py_time=py_time): + self.do_test_TimeValue(py_time) + def test_UShortValue(self): sequence = (4, 6, 9, 5) text = ' '.join(str(x) for x in sequence)