aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2012-09-21 09:20:37 +0200
committerOlivier Tilloy <olivier@tilloy.net>2012-09-21 09:20:37 +0200
commitc1038d70c29206b189bb173c149a57aff93d62d7 (patch)
tree0cba1dcd60852fd86cd587551e7e02e772751e9b /src
parent7e7cb325f942582a43602d460dac4c8e47fdc002 (diff)
parentd152cf4555c5a0e4c7a8136bfb4b8dfcbb11b653 (diff)
downloadpyexiv2-master.tar.gz
Instantiate the exiv2_version tuple inside the boost module declaration.HEADmaster
This fixes a segmentation fault when exiting the python interpreter.
Diffstat (limited to 'src')
-rw-r--r--src/exiv2wrapper_python.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/exiv2wrapper_python.cpp b/src/exiv2wrapper_python.cpp
index 3a09a0c..3fe1ce5 100644
--- a/src/exiv2wrapper_python.cpp
+++ b/src/exiv2wrapper_python.cpp
@@ -1,6 +1,6 @@
// *****************************************************************************
/*
- * Copyright (C) 2006-2010 Olivier Tilloy <olivier@tilloy.net>
+ * Copyright (C) 2006-2012 Olivier Tilloy <olivier@tilloy.net>
*
* This file is part of the pyexiv2 distribution.
*
@@ -34,14 +34,12 @@ using namespace boost::python;
using namespace exiv2wrapper;
-boost::python::tuple exiv2_version = \
- boost::python::make_tuple(EXIV2_MAJOR_VERSION,
- EXIV2_MINOR_VERSION,
- EXIV2_PATCH_VERSION);
-
BOOST_PYTHON_MODULE(libexiv2python)
{
- scope().attr("exiv2_version_info") = exiv2_version;
+ scope().attr("exiv2_version_info") = \
+ boost::python::make_tuple(EXIV2_MAJOR_VERSION,
+ EXIV2_MINOR_VERSION,
+ EXIV2_PATCH_VERSION);
register_exception_translator<Exiv2::Error>(&translateExiv2Error);