@@ -4358,8 +4358,12 @@ namespace Exiv2 {
43584358
43594359
43604360static bool enableBMFF (bool enable) {
4361+ // deprecated since 2024-08-01
4362+ PyErr_WarnEx (PyExc_DeprecationWarning,
4363+ " BMFF is already enabled if libexiv2 was built with BMFF support" ,
4364+ 1 );
43614365#ifdef EXV_ENABLE_BMFF
4362- return Exiv2::enableBMFF (enable) ;
4366+ return true ;
43634367#else
43644368 return false ;
43654369#endif // EXV_ENABLE_BMFF
@@ -7047,8 +7051,8 @@ static PyMethodDef SwigMethods[] = {
70477051 { " enableBMFF" , _wrap_enableBMFF, METH_VARARGS, " \n "
70487052 " Enable BMFF support.\n "
70497053 " \n "
7050- " If libexiv2 has been built with BMFF support included it can be enabled\n "
7051- " by calling enableBMFF(True) .\n "
7054+ " If libexiv2 has been built with BMFF support it is already enabled\n "
7055+ " and this fubction does nothing .\n "
70527056 " :type enable: bool, optional\n "
70537057 " :param enable: Set to True to enable BMFF file access.\n "
70547058 " :rtype: bool\n "
@@ -7062,8 +7066,8 @@ SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__Image_getset[] = {
70627066 { (char *)" __dict__" , SwigPyBuiltin_FunpackGetterClosure, 0 , (char *)" \n "
70637067 " Enable BMFF support.\n "
70647068 " \n "
7065- " If libexiv2 has been built with BMFF support included it can be enabled\n "
7066- " by calling enableBMFF(True) .\n "
7069+ " If libexiv2 has been built with BMFF support it is already enabled\n "
7070+ " and this fubction does nothing .\n "
70677071 " :type enable: bool, optional\n "
70687072 " :param enable: Set to True to enable BMFF file access.\n "
70697073 " :rtype: bool\n "
@@ -8887,6 +8891,11 @@ SWIG_init(void) {
88878891 }
88888892
88898893
8894+ #if defined EXV_ENABLE_BMFF && !EXIV2_TEST_VERSION(0, 28, 3)
8895+ Exiv2::enableBMFF (true );
8896+ #endif
8897+
8898+
88908899 {
88918900 PyObject* module = PyImport_ImportModule (" enum" );
88928901 if (!module )
0 commit comments