From 1aa65000568422f0187d2eb4fef00bcdca0cc125 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Thu, 15 Sep 2016 13:27:17 -0400 Subject: Update the ObjC version checks to support a min and current version. - Capture the version used to generated. - Check at compile time and runtime that generated code isn't from a newer version, also check that the min version required is also supported. - Keep the old constants/macros/functions to special case the last version that was working so those generated sources still work until we decide otherwise. --- objectivec/google/protobuf/Api.pbobjc.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'objectivec/google/protobuf/Api.pbobjc.h') diff --git a/objectivec/google/protobuf/Api.pbobjc.h b/objectivec/google/protobuf/Api.pbobjc.h index 3750e093..742a8122 100644 --- a/objectivec/google/protobuf/Api.pbobjc.h +++ b/objectivec/google/protobuf/Api.pbobjc.h @@ -13,8 +13,11 @@ #import "GPBProtocolBuffers.h" #endif -#if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30002 -#error This file was generated by a different version of protoc which is incompatible with your Protocol Buffer library sources. +#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 +#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. +#endif +#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION +#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. #endif // @@protoc_insertion_point(imports) -- cgit v1.2.3