Renamed variable

This commit is contained in:
Andrew Murray 2019-12-31 09:04:25 +11:00
parent 82356f7f36
commit f77c409742
3 changed files with 6 additions and 6 deletions

View File

@ -272,7 +272,7 @@ class TestFileLibTiff(LibTiffTestCase):
}
libtiffs = [False]
if Image.core.libtiff_v4_or_greater:
if Image.core.libtiff_support_custom_tags:
libtiffs.append(True)
for libtiff in libtiffs:

View File

@ -1556,7 +1556,7 @@ def _save(im, fp, filename):
if tag not in TiffTags.LIBTIFF_CORE:
if (
TiffTags.lookup(tag).type == TiffTags.UNDEFINED
or not Image.core.libtiff_v4_or_greater
or not Image.core.libtiff_support_custom_tags
):
continue

View File

@ -3969,13 +3969,13 @@ setup_module(PyObject* m) {
PyDict_SetItemString(d, "libtiff_version", PyUnicode_FromString(ImagingTiffVersion()));
// Test for libtiff 4.0 or later, excluding libtiff 3.9.6 and 3.9.7
PyObject* v4_or_greater;
PyObject* support_custom_tags;
#if TIFFLIB_VERSION >= 20111221 && TIFFLIB_VERSION != 20120218 && TIFFLIB_VERSION != 20120922
v4_or_greater = Py_True;
support_custom_tags = Py_True;
#else
v4_or_greater = Py_False;
support_custom_tags = Py_False;
#endif
PyDict_SetItemString(d, "libtiff_v4_or_greater", v4_or_greater);
PyDict_SetItemString(d, "libtiff_support_custom_tags", support_custom_tags);
}
#endif