Author: Olivier Tilloy Description: Instantiate the exiv2_version tuple inside the boost module declaration. This fixes a segmentation fault when exiting the python interpreter. Bug: https://bugs.launchpad.net/ubuntu/+source/pyexiv2/+bug/1050918 === modified file 'src/exiv2wrapper_python.cpp' --- old/src/exiv2wrapper_python.cpp 2010-12-19 23:41:38 +0000 +++ new/src/exiv2wrapper_python.cpp 2012-09-21 07:14:57 +0000 @@ -1,6 +1,6 @@ // ***************************************************************************** /* - * Copyright (C) 2006-2010 Olivier Tilloy + * Copyright (C) 2006-2012 Olivier Tilloy * * This file is part of the pyexiv2 distribution. * @@ -34,14 +34,12 @@ 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(&translateExiv2Error);