summaryrefslogtreecommitdiffstats
path: root/macosx/HBCodingUtilities.h
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2017-01-25 11:03:00 +0100
committerDamiano Galassi <[email protected]>2017-01-25 11:03:00 +0100
commit178071e0ce842af53e8c51e6275e8956fc4aa27c (patch)
tree6337430f7ec1900ce562bf394954469cc68b80d2 /macosx/HBCodingUtilities.h
parent79c33c0ca996311224bbd3719c85238a3358cb5e (diff)
MacGui: improve management of security scoped resources. Fix external SRT in the sandboxed build.
Diffstat (limited to 'macosx/HBCodingUtilities.h')
-rw-r--r--macosx/HBCodingUtilities.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/macosx/HBCodingUtilities.h b/macosx/HBCodingUtilities.h
index 17d188b7f..cc92f9b6e 100644
--- a/macosx/HBCodingUtilities.h
+++ b/macosx/HBCodingUtilities.h
@@ -23,6 +23,9 @@
#define decodeCollectionOfObjects2(x, cl, objectcl, objectcl2) x = [HBCodingUtilities decodeObjectOfClasses:[NSSet setWithObjects:[cl class], [objectcl class], [objectcl2 class], nil] forKey:OBJC_STRINGIFY(x) decoder:decoder];
+#define decodeCollectionOfObjects3(x, cl, objectcl, objectcl2, objectcl3) x = [HBCodingUtilities decodeObjectOfClasses:[NSSet setWithObjects:[cl class], [objectcl class], [objectcl2 class], [objectcl3 class], nil] forKey:OBJC_STRINGIFY(x) decoder:decoder];
+
+
#define decodeObjectOrFail(x, class) x = [HBCodingUtilities decodeObjectOfClass:class forKey:OBJC_STRINGIFY(x) decoder:decoder]; if (x == nil) {NSLog(@"Failed to decode: %@", OBJC_STRINGIFY(x)); goto fail;}
NS_ASSUME_NONNULL_BEGIN