summaryrefslogtreecommitdiffstats
path: root/macosx/HBCodingUtilities.h
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2019-08-11 09:07:20 +0200
committerDamiano Galassi <[email protected]>2019-08-11 09:07:20 +0200
commitbed55e05880f0286f504142a48089bce60c96cc7 (patch)
tree795647e216e70981acc9ba0769eb03c53da44023 /macosx/HBCodingUtilities.h
parent6437b9d6653352011dc8af541b373369c45c8d44 (diff)
MacGui: move the queue libhb instance to an xpc service.
Diffstat (limited to 'macosx/HBCodingUtilities.h')
-rw-r--r--macosx/HBCodingUtilities.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/macosx/HBCodingUtilities.h b/macosx/HBCodingUtilities.h
index 8635720ea..e0f3e1f04 100644
--- a/macosx/HBCodingUtilities.h
+++ b/macosx/HBCodingUtilities.h
@@ -25,5 +25,9 @@
#define decodeCollectionOfObjects3(x, cl, objectcl, objectcl2, objectcl3) x = [decoder decodeObjectOfClasses:[NSSet setWithObjects:[cl class], [objectcl class], [objectcl2 class], [objectcl3 class], nil] forKey:OBJC_STRINGIFY(x)];
+#define decodeCollectionOfObjects4(x, cl, objectcl, objectcl2, objectcl3, objectcl4) x = [decoder decodeObjectOfClasses:[NSSet setWithObjects:[cl class], [objectcl class], [objectcl2 class], [objectcl3 class], [objectcl4 class], nil] forKey:OBJC_STRINGIFY(x)];
+
+#define decodeCollectionOfObjects5(x, cl, objectcl, objectcl2, objectcl3, objectcl4, objectcl5) x = [decoder decodeObjectOfClasses:[NSSet setWithObjects:[cl class], [objectcl class], [objectcl2 class], [objectcl3 class], [objectcl4 class], [objectcl5 class], nil] forKey:OBJC_STRINGIFY(x)];
+
#define decodeObjectOrFail(x, cl) x = [decoder decodeObjectOfClass:[cl class] forKey:OBJC_STRINGIFY(x)]; if (x == nil) {NSLog(@"Failed to decode: %@", OBJC_STRINGIFY(x)); goto fail;}