You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately some documentation gets lost in the manipulations needed to make a useful interface.
60
+
The C++ documentation is still needed in these cases.
58
61
59
62
Assignment
60
63
----------
@@ -149,10 +152,13 @@ This allows them to be used in a very Pythonic style::
149
152
Warning: segmentation faults
150
153
----------------------------
151
154
152
-
It is easy to crash python-exiv2 if you delete objects which contain data that another object is pointing to.
153
-
For example, deleting an ``Image`` after extracting its metadata can cause a segfault when the metadata is accessed.
154
-
Ideally the Python interface to libexiv2 would use Python objects' reference counts to ensure this doesn't happen, preventing the deletion of the ``Image`` object until all references to it have been deleted.
155
-
Unfortunately I haven't found a sensible way to do this in the Python interface, so some care is needed when using it.
155
+
Many of the libexiv2 objects point to data in other objects.
156
+
For example, ``image.exifData()`` returns an object that points to data in ``image``.
157
+
The Python interface uses Python objects' reference counting to prevent ``image`` being deleted while its data is being pointed at by another object.
158
+
This avoids one possible cause of segfaults.
159
+
160
+
There may be other cases where the Python interface doesn't prevent segfaults.
0 commit comments