aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2010-03-16 18:02:18 +0100
committerOlivier Tilloy <olivier@tilloy.net>2010-03-16 18:02:18 +0100
commit1ac129300d133fcbc5ef6766fc074ecf402dfd6c (patch)
tree6ce685b1eb9a5e1940cc4207607b1ef088617805 /src
parent53d5be74f1f26779e3bf0429512576af5cebbeb7 (diff)
downloadpyexiv2-1ac129300d133fcbc5ef6766fc074ecf402dfd6c.tar.gz
Comment to explain the exception handling
outside of the Py_{BEGIN,END}_ALLOW_THREADS block.
Diffstat (limited to 'src')
-rw-r--r--src/exiv2wrapper.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/exiv2wrapper.cpp b/src/exiv2wrapper.cpp
index 99f72da..ad145d1 100644
--- a/src/exiv2wrapper.cpp
+++ b/src/exiv2wrapper.cpp
@@ -43,6 +43,8 @@ namespace exiv2wrapper
void Image::_instantiate_image()
{
+ // If an exception is thrown, it has to be done outside of the
+ // Py_{BEGIN,END}_ALLOW_THREADS block.
Exiv2::Error error(0);
// Release the GIL to allow other python threads to run
@@ -88,6 +90,8 @@ Image::Image(const Image& image)
void Image::readMetadata()
{
+ // If an exception is thrown, it has to be done outside of the
+ // Py_{BEGIN,END}_ALLOW_THREADS block.
Exiv2::Error error(0);
// Release the GIL to allow other python threads to run
@@ -120,6 +124,8 @@ void Image::writeMetadata()
{
CHECK_METADATA_READ
+ // If an exception is thrown, it has to be done outside of the
+ // Py_{BEGIN,END}_ALLOW_THREADS block.
Exiv2::Error error(0);
// Release the GIL to allow other python threads to run