@@ -4429,6 +4429,33 @@ class ExifData_iterator : public ExifData_iterator_base {
44294429};
44304430
44314431
4432+ static PyObject* _get_store (PyObject* py_self) {
4433+ if (!PyObject_HasAttrString (py_self, " _private_data_" )) {
4434+ PyObject* dict = PyDict_New ();
4435+ if (!dict)
4436+ return NULL ;
4437+ int error = PyObject_SetAttrString (py_self, " _private_data_" , dict);
4438+ Py_DECREF (dict);
4439+ if (error)
4440+ return NULL ;
4441+ }
4442+ return PyObject_GetAttrString (py_self, " _private_data_" );
4443+ };
4444+ static int store_private (PyObject* py_self, const char * name,
4445+ PyObject* val) {
4446+ PyObject* dict = _get_store (py_self);
4447+ if (!dict)
4448+ return -1 ;
4449+ int result = 0 ;
4450+ if (val)
4451+ result = PyDict_SetItemString (dict, name, val);
4452+ else if (PyDict_GetItemString (dict, name))
4453+ result = PyDict_DelItemString (dict, name);
4454+ Py_DECREF (dict);
4455+ return result;
4456+ };
4457+
4458+
44324459SWIGINTERNINLINE PyObject*
44334460 SWIG_From_bool (bool value)
44344461{
@@ -5539,7 +5566,7 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_base___iter__(PyObject *self, PyObj
55395566 }
55405567
55415568 if (resultobj != Py_None)
5542- if (PyObject_SetAttrString (resultobj, " _refers_to" , self)) {
5569+ if (store_private (resultobj, " _refers_to" , self)) {
55435570 SWIG_fail;
55445571 }
55455572
@@ -6874,7 +6901,7 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_value__SWIG_0(PyObject *self, PyObj
68746901 }
68756902
68766903 if (resultobj != Py_None)
6877- if (PyObject_SetAttrString (resultobj, " _refers_to" , self)) {
6904+ if (store_private (resultobj, " _refers_to" , self)) {
68786905 SWIG_fail;
68796906 }
68806907
@@ -6926,7 +6953,7 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_value__SWIG_1(PyObject *self, PyObj
69266953 }
69276954
69286955 if (resultobj != Py_None)
6929- if (PyObject_SetAttrString (resultobj, " _refers_to" , self)) {
6956+ if (store_private (resultobj, " _refers_to" , self)) {
69306957 SWIG_fail;
69316958 }
69326959
@@ -8231,7 +8258,7 @@ SWIGINTERN PyObject *_wrap_Exifdatum_value__SWIG_0(PyObject *self, PyObject *arg
82318258 }
82328259
82338260 if (resultobj != Py_None)
8234- if (PyObject_SetAttrString (resultobj, " _refers_to" , self)) {
8261+ if (store_private (resultobj, " _refers_to" , self)) {
82358262 SWIG_fail;
82368263 }
82378264
@@ -8432,7 +8459,7 @@ SWIGINTERN PyObject *_wrap_Exifdatum_value__SWIG_1(PyObject *self, PyObject *arg
84328459 }
84338460
84348461 if (resultobj != Py_None)
8435- if (PyObject_SetAttrString (resultobj, " _refers_to" , self)) {
8462+ if (store_private (resultobj, " _refers_to" , self)) {
84368463 SWIG_fail;
84378464 }
84388465
@@ -8850,7 +8877,7 @@ SWIGINTERN int _wrap_new_ExifThumb(PyObject *self, PyObject *args, PyObject *kwa
88508877 resultobj = SWIG_NewPointerObj (SWIG_as_voidptr (result), SWIGTYPE_p_Exiv2__ExifThumb, SWIG_BUILTIN_INIT | 0 );
88518878
88528879 if (resultobj != Py_None)
8853- if (PyObject_SetAttrString (resultobj, " _refers_to" , args)) {
8880+ if (store_private (resultobj, " _refers_to" , args)) {
88548881 SWIG_fail;
88558882 }
88568883
@@ -9423,7 +9450,7 @@ SWIGINTERN PyObject *_wrap_ExifData_erase__SWIG_0(PyObject *self, PyObject *args
94239450 }
94249451
94259452 if (resultobj != Py_None)
9426- if (PyObject_SetAttrString (resultobj, " _refers_to" , self)) {
9453+ if (store_private (resultobj, " _refers_to" , self)) {
94279454 SWIG_fail;
94289455 }
94299456
@@ -9494,7 +9521,7 @@ SWIGINTERN PyObject *_wrap_ExifData_erase__SWIG_1(PyObject *self, PyObject *args
94949521 }
94959522
94969523 if (resultobj != Py_None)
9497- if (PyObject_SetAttrString (resultobj, " _refers_to" , self)) {
9524+ if (store_private (resultobj, " _refers_to" , self)) {
94989525 SWIG_fail;
94999526 }
95009527
@@ -9638,7 +9665,7 @@ SWIGINTERN PyObject *_wrap_ExifData_begin(PyObject *self, PyObject *args) {
96389665 }
96399666
96409667 if (resultobj != Py_None)
9641- if (PyObject_SetAttrString (resultobj, " _refers_to" , self)) {
9668+ if (store_private (resultobj, " _refers_to" , self)) {
96429669 SWIG_fail;
96439670 }
96449671
@@ -9671,7 +9698,7 @@ SWIGINTERN PyObject *_wrap_ExifData_end(PyObject *self, PyObject *args) {
96719698 }
96729699
96739700 if (resultobj != Py_None)
9674- if (PyObject_SetAttrString (resultobj, " _refers_to" , self)) {
9701+ if (store_private (resultobj, " _refers_to" , self)) {
96759702 SWIG_fail;
96769703 }
96779704
@@ -9724,7 +9751,7 @@ SWIGINTERN PyObject *_wrap_ExifData_findKey(PyObject *self, PyObject *args) {
97249751 }
97259752
97269753 if (resultobj != Py_None)
9727- if (PyObject_SetAttrString (resultobj, " _refers_to" , self)) {
9754+ if (store_private (resultobj, " _refers_to" , self)) {
97289755 SWIG_fail;
97299756 }
97309757
@@ -9816,7 +9843,7 @@ SWIGINTERN PyObject *_wrap_ExifData___getitem__(PyObject *self, PyObject *args)
98169843 if (SWIG_IsNewObj (res2)) delete arg2;
98179844
98189845 if (resultobj != Py_None)
9819- if (PyObject_SetAttrString (resultobj, " _refers_to" , self)) {
9846+ if (store_private (resultobj, " _refers_to" , self)) {
98209847 SWIG_fail;
98219848 }
98229849
0 commit comments