Clarifying which BinaryDiff fields are available when

This commit is contained in:
Zorg committed 2015-04-17 15:14:51 -04:00
1 parent 186cfa8486
commit fd68e649db
1 file changed
+6 -6
+6 -6
View File
@@ -47,32 +47,32 @@ int applyBinaryDelta(NSString *source, NSString *destination, NSString *patchFil
if (!strcmp(xar_subdoc_name(subdoc), "binary-delta-attributes")) {
const char *value = 0;
// only available in version 2.0 or later
// available in version 2.0 or later
xar_subdoc_prop_get(subdoc, "major-version", &value);
if (value)
majorDiffVersion = (uint16_t)[@(value) intValue];
// only available in version 2.0 or later
// available in version 2.0 or later
xar_subdoc_prop_get(subdoc, "minor-version", &value);
if (value)
minorDiffVersion = (uint16_t)[@(value) intValue];
// deprecated since version 2.0
// only available in version 1.0
xar_subdoc_prop_get(subdoc, "before-sha1", &value);
if (value)
expectedBeforeHashv1 = @(value);
// deprecated since version 2.0
// only available in version 1.0
xar_subdoc_prop_get(subdoc, "after-sha1", &value);
if (value)
expectedAfterHashv1 = @(value);
// only available in version 2.0 or later
// available in version 2.0 or later
xar_subdoc_prop_get(subdoc, "before-tree-sha1", &value);
if (value)
expectedNewBeforeHash = @(value);
// only available in version 2.0 or later
// available in version 2.0 or later
xar_subdoc_prop_get(subdoc, "after-tree-sha1", &value);
if (value)
expectedNewAfterHash = @(value);