Skip to content

Commit 38e6300

Browse files
Remove warning about memoryview return values
Recent changes have made these returned values safe to use without having to take any extra precautions such as keeping references to their parent objects.
1 parent 379d1f0 commit 38e6300

7 files changed

Lines changed: 0 additions & 24 deletions

File tree

src/interface/shared/buffers.i

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@ static int release_views(PyObject* py_self) {
137137
%feature("docstring") doc_method
138138
"Returns a temporary Python memoryview of the object's data.
139139
140-
WARNING: do not resize or delete the object while using the view.
141-
142140
:rtype: memoryview"
143141
#endif
144142
%enddef // RETURN_VIEW

src/swig-0_27_7/preview_wrap.cxx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7285,16 +7285,12 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__PreviewImage_methods[] = {
72857285
{ "data", _wrap_PreviewImage_data, METH_NOARGS, "\n"
72867286
"Returns a temporary Python memoryview of the object's data.\n"
72877287
"\n"
7288-
"WARNING: do not resize or delete the object while using the view.\n"
7289-
"\n"
72907288
":rtype: memoryview\n"
72917289
"" },
72927290
{ "_view_deleted_cb", _wrap_PreviewImage__view_deleted_cb, METH_O, "" },
72937291
{ "pData", _wrap_PreviewImage_pData, METH_NOARGS, "\n"
72947292
"Returns a temporary Python memoryview of the object's data.\n"
72957293
"\n"
7296-
"WARNING: do not resize or delete the object while using the view.\n"
7297-
"\n"
72987294
":rtype: memoryview\n"
72997295
"" },
73007296
{ NULL, NULL, 0, NULL } /* Sentinel */

src/swig-0_27_7/types_wrap.cxx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7290,8 +7290,6 @@ SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__DataBuf_getset[] = {
72907290
{ (char *)"pData_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"\n"
72917291
"Returns a temporary Python memoryview of the object's data.\n"
72927292
"\n"
7293-
"WARNING: do not resize or delete the object while using the view.\n"
7294-
"\n"
72957293
":rtype: memoryview\n"
72967294
"", &DataBuf_pData__getset },
72977295
{ (char *)"size_", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"The current size of the buffer", &DataBuf_size__getset },
@@ -7355,8 +7353,6 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DataBuf_methods[] = {
73557353
{ "data", _wrap_DataBuf_data, METH_NOARGS, "\n"
73567354
"Returns a temporary Python memoryview of the object's data.\n"
73577355
"\n"
7358-
"WARNING: do not resize or delete the object while using the view.\n"
7359-
"\n"
73607356
":rtype: memoryview\n"
73617357
"" },
73627358
{ "size", _wrap_DataBuf_size, METH_NOARGS, "" },

src/swig-0_27_7/value_wrap.cxx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25565,8 +25565,6 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__StringValueBase_methods[] = {
2556525565
{ "data", _wrap_StringValueBase_data, METH_VARARGS, "\n"
2556625566
"Returns a temporary Python memoryview of the object's data.\n"
2556725567
"\n"
25568-
"WARNING: do not resize or delete the object while using the view.\n"
25569-
"\n"
2557025568
":rtype: memoryview\n"
2557125569
"" },
2557225570
{ "_view_deleted_cb", _wrap_StringValueBase__view_deleted_cb, METH_VARARGS, "" },
@@ -27613,8 +27611,6 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpTextValue_methods[] = {
2761327611
{ "data", _wrap_XmpTextValue_data, METH_VARARGS, "\n"
2761427612
"Returns a temporary Python memoryview of the object's data.\n"
2761527613
"\n"
27616-
"WARNING: do not resize or delete the object while using the view.\n"
27617-
"\n"
2761827614
":rtype: memoryview\n"
2761927615
"" },
2762027616
{ "_view_deleted_cb", _wrap_XmpTextValue__view_deleted_cb, METH_VARARGS, "" },

src/swig-0_28_5/preview_wrap.cxx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7285,16 +7285,12 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__PreviewImage_methods[] = {
72857285
{ "data", _wrap_PreviewImage_data, METH_NOARGS, "\n"
72867286
"Returns a temporary Python memoryview of the object's data.\n"
72877287
"\n"
7288-
"WARNING: do not resize or delete the object while using the view.\n"
7289-
"\n"
72907288
":rtype: memoryview\n"
72917289
"" },
72927290
{ "_view_deleted_cb", _wrap_PreviewImage__view_deleted_cb, METH_O, "" },
72937291
{ "pData", _wrap_PreviewImage_pData, METH_NOARGS, "\n"
72947292
"Returns a temporary Python memoryview of the object's data.\n"
72957293
"\n"
7296-
"WARNING: do not resize or delete the object while using the view.\n"
7297-
"\n"
72987294
":rtype: memoryview\n"
72997295
"" },
73007296
{ NULL, NULL, 0, NULL } /* Sentinel */

src/swig-0_28_5/types_wrap.cxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7354,8 +7354,6 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DataBuf_methods[] = {
73547354
{ "data", _wrap_DataBuf_data, METH_NOARGS, "\n"
73557355
"Returns a temporary Python memoryview of the object's data.\n"
73567356
"\n"
7357-
"WARNING: do not resize or delete the object while using the view.\n"
7358-
"\n"
73597357
":rtype: memoryview\n"
73607358
"" },
73617359
{ "empty", _wrap_DataBuf_empty, METH_NOARGS, "" },

src/swig-0_28_5/value_wrap.cxx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26065,8 +26065,6 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__StringValueBase_methods[] = {
2606526065
{ "data", _wrap_StringValueBase_data, METH_VARARGS, "\n"
2606626066
"Returns a temporary Python memoryview of the object's data.\n"
2606726067
"\n"
26068-
"WARNING: do not resize or delete the object while using the view.\n"
26069-
"\n"
2607026068
":rtype: memoryview\n"
2607126069
"" },
2607226070
{ "_view_deleted_cb", _wrap_StringValueBase__view_deleted_cb, METH_VARARGS, "" },
@@ -28054,8 +28052,6 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpTextValue_methods[] = {
2805428052
{ "data", _wrap_XmpTextValue_data, METH_VARARGS, "\n"
2805528053
"Returns a temporary Python memoryview of the object's data.\n"
2805628054
"\n"
28057-
"WARNING: do not resize or delete the object while using the view.\n"
28058-
"\n"
2805928055
":rtype: memoryview\n"
2806028056
"" },
2806128057
{ "_view_deleted_cb", _wrap_XmpTextValue__view_deleted_cb, METH_VARARGS, "" },

0 commit comments

Comments
 (0)