@@ -4901,6 +4901,9 @@ SWIGINTERN char const *Exiv2_BasicIo_ioType(Exiv2::BasicIo *self){
49014901 }
49024902 return " unknown" ;
49034903 }
4904+ SWIGINTERN void Exiv2_BasicIo__release (Exiv2::BasicIo *self,PyObject *args,PyObject *kw){
4905+ self->munmap ();
4906+ }
49044907SWIGINTERN DataContext *Exiv2_BasicIo_data (Exiv2::BasicIo *self,bool isWriteable){
49054908 return new DataContext (self, isWriteable);
49064909 }
@@ -5611,6 +5614,9 @@ SWIGINTERN PyObject *_wrap_BasicIo_mmap(PyObject *self, PyObject *args) {
56115614 }
56125615 arg2 = static_cast < bool >(val2);
56135616 }
5617+ {
5618+ release_views (self);
5619+ }
56145620 {
56155621 try {
56165622 {
@@ -5629,7 +5635,7 @@ SWIGINTERN PyObject *_wrap_BasicIo_mmap(PyObject *self, PyObject *args) {
56295635 if (!resultobj)
56305636 SWIG_fail;
56315637 // Store a weak ref to the new memoryview
5632- if (store_view (self, resultobj))
5638+ if (store_view (self, resultobj, self ))
56335639 SWIG_fail;
56345640
56355641 return resultobj;
@@ -5846,6 +5852,44 @@ SWIGINTERN PyObject *_wrap_BasicIo_ioType(PyObject *self, PyObject *args) {
58465852}
58475853
58485854
5855+ SWIGINTERN PyObject *_wrap_BasicIo__release (PyObject *self, PyObject *args) {
5856+ PyObject *resultobj = 0 ;
5857+ Exiv2::BasicIo *arg1 = (Exiv2::BasicIo *) 0 ;
5858+ PyObject *arg2 = (PyObject *) 0 ;
5859+ PyObject *arg3 = (PyObject *) 0 ;
5860+ void *argp1 = 0 ;
5861+ int res1 = 0 ;
5862+ PyObject * obj1 = 0 ;
5863+ PyObject * obj2 = 0 ;
5864+
5865+ if (!PyArg_UnpackTuple (args, " BasicIo__release" , 2 , 2 , &obj1, &obj2)) SWIG_fail;
5866+ res1 = SWIG_ConvertPtr (self, &argp1,SWIGTYPE_p_Exiv2__BasicIo, 0 | 0 );
5867+ if (!SWIG_IsOK (res1)) {
5868+ SWIG_exception_fail (SWIG_ArgError (res1), " in method '" " BasicIo__release" " ', argument " " 1" " of type '" " Exiv2::BasicIo *" " '" );
5869+ }
5870+ arg1 = reinterpret_cast < Exiv2::BasicIo * >(argp1);
5871+ arg2 = obj1;
5872+ arg3 = obj2;
5873+ {
5874+ try {
5875+ {
5876+ SWIG_PYTHON_THREAD_BEGIN_ALLOW ;
5877+ Exiv2_BasicIo__release (arg1,arg2,arg3);
5878+ SWIG_PYTHON_THREAD_END_ALLOW ;
5879+ }
5880+ }
5881+ catch (std::exception const & e) {
5882+ _set_python_exception ();
5883+ SWIG_fail;
5884+ }
5885+ }
5886+ resultobj = SWIG_Py_Void ();
5887+ return resultobj;
5888+ fail:
5889+ return NULL ;
5890+ }
5891+
5892+
58495893SWIGINTERN PyObject *_wrap_BasicIo_data (PyObject *self, PyObject *args) {
58505894 PyObject *resultobj = 0 ;
58515895 Exiv2::BasicIo *arg1 = (Exiv2::BasicIo *) 0 ;
@@ -5873,6 +5917,9 @@ SWIGINTERN PyObject *_wrap_BasicIo_data(PyObject *self, PyObject *args) {
58735917 }
58745918 arg2 = static_cast < bool >(val2);
58755919 }
5920+ {
5921+ release_views (self);
5922+ }
58765923 {
58775924 try {
58785925 {
@@ -5903,6 +5950,8 @@ SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_BasicIo) /* defines _wrap_delete_BasicIo_
59035950
59045951SWIGPY_LENFUNC_CLOSURE (_wrap_BasicIo_size) /* defines _wrap_BasicIo_size_lenfunc_closure */
59055952
5953+ SWIGPY_TERNARYFUNC_CLOSURE (_wrap_BasicIo__release) /* defines _wrap_BasicIo__release_ternaryfunc_closure */
5954+
59065955static PyMethodDef SwigMethods[] = {
59075956 { " _enum_list_Position" , _wrap__enum_list_Position, METH_VARARGS , NULL },
59085957 { NULL , NULL , 0 , NULL }
@@ -6480,6 +6529,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__BasicIo_methods[] = {
64806529 " :rtype: str\n "
64816530 " :return: A class name such as \" FileIo\" .\n "
64826531 " " },
6532+ { " _release" , _wrap_BasicIo__release, METH_VARARGS , " " },
64836533 { " data" , _wrap_BasicIo_data, METH_VARARGS , " \n "
64846534 " Return a data context manager.\n "
64856535 " \n "
@@ -6525,7 +6575,7 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__BasicIo_type = {
65256575 &SwigPyBuiltin__Exiv2__BasicIo_type.as_sequence , /* tp_as_sequence */
65266576 &SwigPyBuiltin__Exiv2__BasicIo_type.as_mapping , /* tp_as_mapping */
65276577 SwigPyObject_hash, /* tp_hash */
6528- (ternaryfunc) 0 , /* tp_call */
6578+ _wrap_BasicIo__release_ternaryfunc_closure, /* tp_call */
65296579 (reprfunc) 0 , /* tp_str */
65306580 (getattrofunc) 0 , /* tp_getattro */
65316581 (setattrofunc) 0 , /* tp_setattro */
@@ -6761,7 +6811,7 @@ static PyTypeObject *SwigPyBuiltin__Exiv2__BasicIo_type_create(PyTypeObject *typ
67616811 { Py_tp_methods, (void *)SwigPyBuiltin__Exiv2__BasicIo_methods },
67626812 { Py_tp_getset, (void *)SwigPyBuiltin__Exiv2__BasicIo_getset },
67636813 { Py_tp_hash, (void *)SwigPyObject_hash },
6764- { Py_tp_call, (void *)(ternaryfunc) 0 },
6814+ { Py_tp_call, (void *)_wrap_BasicIo__release_ternaryfunc_closure },
67656815 { Py_tp_getattro, (void *)(getattrofunc) 0 },
67666816 { Py_tp_setattro, (void *)(setattrofunc) 0 },
67676817 { Py_tp_descr_get, (void *)(descrgetfunc) 0 },
0 commit comments