Skip to content

Commit 84b1a55

Browse files
Remove kerErrorCount from ErrorCode enum
It's not a constant - every time a new error code is added it gets incremented - so it isn't valid if python-exiv2 is built with a version of libexiv2 different from the one used to run SWIG.
1 parent 4cc8656 commit 84b1a55

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/interface/error.i

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,7 @@ DEFINE_ENUM(ErrorCode, "Complete list of all Exiv2 error codes.",
174174
"kerCorruptedMetadata", Exiv2::ErrorCode::kerCorruptedMetadata,
175175
"kerArithmeticOverflow", Exiv2::ErrorCode::kerArithmeticOverflow,
176176
"kerMallocFailed", Exiv2::ErrorCode::kerMallocFailed,
177-
"kerInvalidIconvEncoding", Exiv2::ErrorCode::kerInvalidIconvEncoding,
178-
"kerErrorCount", Exiv2::ErrorCode::kerErrorCount)
177+
"kerInvalidIconvEncoding", Exiv2::ErrorCode::kerInvalidIconvEncoding)
179178
#else
180179
DEFINE_ENUM(ErrorCode, "Complete list of all Exiv2 error codes.",
181180
"kerGeneralError", Exiv2::kerGeneralError,

src/swig-0_28_5/error_wrap.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5407,7 +5407,7 @@ SWIG_init(void) {
54075407
}
54085408

54095409
SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "ErrorCode",_create_enum_Exiv2_ErrorCode(
5410-
"ErrorCode", "Complete list of all Exiv2 error codes.", _get_enum_list(0, "kerSuccess",Exiv2::ErrorCode::kerSuccess,"kerGeneralError",Exiv2::ErrorCode::kerGeneralError,"kerErrorMessage",Exiv2::ErrorCode::kerErrorMessage,"kerCallFailed",Exiv2::ErrorCode::kerCallFailed,"kerNotAnImage",Exiv2::ErrorCode::kerNotAnImage,"kerInvalidDataset",Exiv2::ErrorCode::kerInvalidDataset,"kerInvalidRecord",Exiv2::ErrorCode::kerInvalidRecord,"kerInvalidKey",Exiv2::ErrorCode::kerInvalidKey,"kerInvalidTag",Exiv2::ErrorCode::kerInvalidTag,"kerValueNotSet",Exiv2::ErrorCode::kerValueNotSet,"kerDataSourceOpenFailed",Exiv2::ErrorCode::kerDataSourceOpenFailed,"kerFileOpenFailed",Exiv2::ErrorCode::kerFileOpenFailed,"kerFileContainsUnknownImageType",Exiv2::ErrorCode::kerFileContainsUnknownImageType,"kerMemoryContainsUnknownImageType",Exiv2::ErrorCode::kerMemoryContainsUnknownImageType,"kerUnsupportedImageType",Exiv2::ErrorCode::kerUnsupportedImageType,"kerFailedToReadImageData",Exiv2::ErrorCode::kerFailedToReadImageData,"kerNotAJpeg",Exiv2::ErrorCode::kerNotAJpeg,"kerFailedToMapFileForReadWrite",Exiv2::ErrorCode::kerFailedToMapFileForReadWrite,"kerFileRenameFailed",Exiv2::ErrorCode::kerFileRenameFailed,"kerTransferFailed",Exiv2::ErrorCode::kerTransferFailed,"kerMemoryTransferFailed",Exiv2::ErrorCode::kerMemoryTransferFailed,"kerInputDataReadFailed",Exiv2::ErrorCode::kerInputDataReadFailed,"kerImageWriteFailed",Exiv2::ErrorCode::kerImageWriteFailed,"kerNoImageInInputData",Exiv2::ErrorCode::kerNoImageInInputData,"kerInvalidIfdId",Exiv2::ErrorCode::kerInvalidIfdId,"kerValueTooLarge",Exiv2::ErrorCode::kerValueTooLarge,"kerDataAreaValueTooLarge",Exiv2::ErrorCode::kerDataAreaValueTooLarge,"kerOffsetOutOfRange",Exiv2::ErrorCode::kerOffsetOutOfRange,"kerUnsupportedDataAreaOffsetType",Exiv2::ErrorCode::kerUnsupportedDataAreaOffsetType,"kerInvalidCharset",Exiv2::ErrorCode::kerInvalidCharset,"kerUnsupportedDateFormat",Exiv2::ErrorCode::kerUnsupportedDateFormat,"kerUnsupportedTimeFormat",Exiv2::ErrorCode::kerUnsupportedTimeFormat,"kerWritingImageFormatUnsupported",Exiv2::ErrorCode::kerWritingImageFormatUnsupported,"kerInvalidSettingForImage",Exiv2::ErrorCode::kerInvalidSettingForImage,"kerNotACrwImage",Exiv2::ErrorCode::kerNotACrwImage,"kerFunctionNotSupported",Exiv2::ErrorCode::kerFunctionNotSupported,"kerNoNamespaceInfoForXmpPrefix",Exiv2::ErrorCode::kerNoNamespaceInfoForXmpPrefix,"kerNoPrefixForNamespace",Exiv2::ErrorCode::kerNoPrefixForNamespace,"kerTooLargeJpegSegment",Exiv2::ErrorCode::kerTooLargeJpegSegment,"kerUnhandledXmpdatum",Exiv2::ErrorCode::kerUnhandledXmpdatum,"kerUnhandledXmpNode",Exiv2::ErrorCode::kerUnhandledXmpNode,"kerXMPToolkitError",Exiv2::ErrorCode::kerXMPToolkitError,"kerDecodeLangAltPropertyFailed",Exiv2::ErrorCode::kerDecodeLangAltPropertyFailed,"kerDecodeLangAltQualifierFailed",Exiv2::ErrorCode::kerDecodeLangAltQualifierFailed,"kerEncodeLangAltPropertyFailed",Exiv2::ErrorCode::kerEncodeLangAltPropertyFailed,"kerPropertyNameIdentificationFailed",Exiv2::ErrorCode::kerPropertyNameIdentificationFailed,"kerSchemaNamespaceNotRegistered",Exiv2::ErrorCode::kerSchemaNamespaceNotRegistered,"kerNoNamespaceForPrefix",Exiv2::ErrorCode::kerNoNamespaceForPrefix,"kerAliasesNotSupported",Exiv2::ErrorCode::kerAliasesNotSupported,"kerInvalidXmpText",Exiv2::ErrorCode::kerInvalidXmpText,"kerTooManyTiffDirectoryEntries",Exiv2::ErrorCode::kerTooManyTiffDirectoryEntries,"kerMultipleTiffArrayElementTagsInDirectory",Exiv2::ErrorCode::kerMultipleTiffArrayElementTagsInDirectory,"kerWrongTiffArrayElementTagType",Exiv2::ErrorCode::kerWrongTiffArrayElementTagType,"kerInvalidKeyXmpValue",Exiv2::ErrorCode::kerInvalidKeyXmpValue,"kerInvalidIccProfile",Exiv2::ErrorCode::kerInvalidIccProfile,"kerInvalidXMP",Exiv2::ErrorCode::kerInvalidXMP,"kerTiffDirectoryTooLarge",Exiv2::ErrorCode::kerTiffDirectoryTooLarge,"kerInvalidTypeValue",Exiv2::ErrorCode::kerInvalidTypeValue,"kerInvalidLangAltValue",Exiv2::ErrorCode::kerInvalidLangAltValue,"kerInvalidMalloc",Exiv2::ErrorCode::kerInvalidMalloc,"kerCorruptedMetadata",Exiv2::ErrorCode::kerCorruptedMetadata,"kerArithmeticOverflow",Exiv2::ErrorCode::kerArithmeticOverflow,"kerMallocFailed",Exiv2::ErrorCode::kerMallocFailed,"kerInvalidIconvEncoding",Exiv2::ErrorCode::kerInvalidIconvEncoding,"kerErrorCount",Exiv2::ErrorCode::kerErrorCount, NULL)));
5410+
"ErrorCode", "Complete list of all Exiv2 error codes.", _get_enum_list(0, "kerSuccess",Exiv2::ErrorCode::kerSuccess,"kerGeneralError",Exiv2::ErrorCode::kerGeneralError,"kerErrorMessage",Exiv2::ErrorCode::kerErrorMessage,"kerCallFailed",Exiv2::ErrorCode::kerCallFailed,"kerNotAnImage",Exiv2::ErrorCode::kerNotAnImage,"kerInvalidDataset",Exiv2::ErrorCode::kerInvalidDataset,"kerInvalidRecord",Exiv2::ErrorCode::kerInvalidRecord,"kerInvalidKey",Exiv2::ErrorCode::kerInvalidKey,"kerInvalidTag",Exiv2::ErrorCode::kerInvalidTag,"kerValueNotSet",Exiv2::ErrorCode::kerValueNotSet,"kerDataSourceOpenFailed",Exiv2::ErrorCode::kerDataSourceOpenFailed,"kerFileOpenFailed",Exiv2::ErrorCode::kerFileOpenFailed,"kerFileContainsUnknownImageType",Exiv2::ErrorCode::kerFileContainsUnknownImageType,"kerMemoryContainsUnknownImageType",Exiv2::ErrorCode::kerMemoryContainsUnknownImageType,"kerUnsupportedImageType",Exiv2::ErrorCode::kerUnsupportedImageType,"kerFailedToReadImageData",Exiv2::ErrorCode::kerFailedToReadImageData,"kerNotAJpeg",Exiv2::ErrorCode::kerNotAJpeg,"kerFailedToMapFileForReadWrite",Exiv2::ErrorCode::kerFailedToMapFileForReadWrite,"kerFileRenameFailed",Exiv2::ErrorCode::kerFileRenameFailed,"kerTransferFailed",Exiv2::ErrorCode::kerTransferFailed,"kerMemoryTransferFailed",Exiv2::ErrorCode::kerMemoryTransferFailed,"kerInputDataReadFailed",Exiv2::ErrorCode::kerInputDataReadFailed,"kerImageWriteFailed",Exiv2::ErrorCode::kerImageWriteFailed,"kerNoImageInInputData",Exiv2::ErrorCode::kerNoImageInInputData,"kerInvalidIfdId",Exiv2::ErrorCode::kerInvalidIfdId,"kerValueTooLarge",Exiv2::ErrorCode::kerValueTooLarge,"kerDataAreaValueTooLarge",Exiv2::ErrorCode::kerDataAreaValueTooLarge,"kerOffsetOutOfRange",Exiv2::ErrorCode::kerOffsetOutOfRange,"kerUnsupportedDataAreaOffsetType",Exiv2::ErrorCode::kerUnsupportedDataAreaOffsetType,"kerInvalidCharset",Exiv2::ErrorCode::kerInvalidCharset,"kerUnsupportedDateFormat",Exiv2::ErrorCode::kerUnsupportedDateFormat,"kerUnsupportedTimeFormat",Exiv2::ErrorCode::kerUnsupportedTimeFormat,"kerWritingImageFormatUnsupported",Exiv2::ErrorCode::kerWritingImageFormatUnsupported,"kerInvalidSettingForImage",Exiv2::ErrorCode::kerInvalidSettingForImage,"kerNotACrwImage",Exiv2::ErrorCode::kerNotACrwImage,"kerFunctionNotSupported",Exiv2::ErrorCode::kerFunctionNotSupported,"kerNoNamespaceInfoForXmpPrefix",Exiv2::ErrorCode::kerNoNamespaceInfoForXmpPrefix,"kerNoPrefixForNamespace",Exiv2::ErrorCode::kerNoPrefixForNamespace,"kerTooLargeJpegSegment",Exiv2::ErrorCode::kerTooLargeJpegSegment,"kerUnhandledXmpdatum",Exiv2::ErrorCode::kerUnhandledXmpdatum,"kerUnhandledXmpNode",Exiv2::ErrorCode::kerUnhandledXmpNode,"kerXMPToolkitError",Exiv2::ErrorCode::kerXMPToolkitError,"kerDecodeLangAltPropertyFailed",Exiv2::ErrorCode::kerDecodeLangAltPropertyFailed,"kerDecodeLangAltQualifierFailed",Exiv2::ErrorCode::kerDecodeLangAltQualifierFailed,"kerEncodeLangAltPropertyFailed",Exiv2::ErrorCode::kerEncodeLangAltPropertyFailed,"kerPropertyNameIdentificationFailed",Exiv2::ErrorCode::kerPropertyNameIdentificationFailed,"kerSchemaNamespaceNotRegistered",Exiv2::ErrorCode::kerSchemaNamespaceNotRegistered,"kerNoNamespaceForPrefix",Exiv2::ErrorCode::kerNoNamespaceForPrefix,"kerAliasesNotSupported",Exiv2::ErrorCode::kerAliasesNotSupported,"kerInvalidXmpText",Exiv2::ErrorCode::kerInvalidXmpText,"kerTooManyTiffDirectoryEntries",Exiv2::ErrorCode::kerTooManyTiffDirectoryEntries,"kerMultipleTiffArrayElementTagsInDirectory",Exiv2::ErrorCode::kerMultipleTiffArrayElementTagsInDirectory,"kerWrongTiffArrayElementTagType",Exiv2::ErrorCode::kerWrongTiffArrayElementTagType,"kerInvalidKeyXmpValue",Exiv2::ErrorCode::kerInvalidKeyXmpValue,"kerInvalidIccProfile",Exiv2::ErrorCode::kerInvalidIccProfile,"kerInvalidXMP",Exiv2::ErrorCode::kerInvalidXMP,"kerTiffDirectoryTooLarge",Exiv2::ErrorCode::kerTiffDirectoryTooLarge,"kerInvalidTypeValue",Exiv2::ErrorCode::kerInvalidTypeValue,"kerInvalidLangAltValue",Exiv2::ErrorCode::kerInvalidLangAltValue,"kerInvalidMalloc",Exiv2::ErrorCode::kerInvalidMalloc,"kerCorruptedMetadata",Exiv2::ErrorCode::kerCorruptedMetadata,"kerArithmeticOverflow",Exiv2::ErrorCode::kerArithmeticOverflow,"kerMallocFailed",Exiv2::ErrorCode::kerMallocFailed,"kerInvalidIconvEncoding",Exiv2::ErrorCode::kerInvalidIconvEncoding, NULL)));
54115411

54125412
/* type 'Exiv2::LogMsg' */
54135413
d = PyDict_New();

0 commit comments

Comments
 (0)