From 1dcc329427fd103a0abd96ab787270f5d0a31861 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Thu, 21 May 2015 17:14:52 -0400 Subject: Objective C Second Alpha Drop - Style fixups in the code. - map<> serialization fixes and more tests. - Autocreation of map<> fields (to match repeated fields). - @@protoc_insertion_point(global_scope|imports). - Fixup proto2 syntax extension support. - Move all startup code to +initialize so it happen on class usage and not app startup. - Have generated headers use forward declarations and move imports into generated code, reduces what is need at compile time to speed up compiled and avoid pointless rippling of rebuilds. --- objectivec/Tests/GPBTestUtilities.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'objectivec/Tests/GPBTestUtilities.h') diff --git a/objectivec/Tests/GPBTestUtilities.h b/objectivec/Tests/GPBTestUtilities.h index 37e30f96..6ae68c3a 100644 --- a/objectivec/Tests/GPBTestUtilities.h +++ b/objectivec/Tests/GPBTestUtilities.h @@ -37,6 +37,13 @@ @class TestPackedExtensions; @class GPBExtensionRegistry; + +// Helper for uses of C arrays in tests cases. +#ifndef GPBARRAYSIZE +#define GPBARRAYSIZE(a) ((sizeof(a) / sizeof((a[0])))) +#endif // GPBARRAYSIZE + + // The number of repetitions of any repeated objects inside of test messages. extern const uint32_t kGPBDefaultRepeatCount; -- cgit v1.2.3