From bdbb863099c7ef3e1ecdeefa732798e095b85fb8 Mon Sep 17 00:00:00 2001 From: temporal Date: Fri, 18 Dec 2009 08:21:00 +0000 Subject: Ensure that 'once' objects are declared using the macro. This is either the third or fourth time I've screwed this up when down-integrating, because our internal code does not require the macro (it's not portable) and on Linux a pthread_once_t that is zero-initialized just happens to work. So, I only discover the problem when I test on Mac, then kick myself for making the same mistake yet again. No more! This time, I have renamed GoogleOnceType to ProtobufOnceType, thus making the type name differ from our internal code. As a result, if you don't update the decls to use the macros, they won't compile. Hah! Take that, future self! --- src/google/protobuf/message.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/google/protobuf/message.cc') diff --git a/src/google/protobuf/message.cc b/src/google/protobuf/message.cc index d43507cd..09166f3a 100644 --- a/src/google/protobuf/message.cc +++ b/src/google/protobuf/message.cc @@ -212,7 +212,7 @@ class GeneratedMessageFactory : public MessageFactory { }; GeneratedMessageFactory* generated_message_factory_ = NULL; -GoogleOnceType generated_message_factory_once_init_; +GOOGLE_PROTOBUF_DECLARE_ONCE(generated_message_factory_once_init_); void ShutdownGeneratedMessageFactory() { delete generated_message_factory_; -- cgit v1.2.3