diff options
author | temporal <temporal@630680e5-0e50-0410-840e-4b1c322b438d> | 2009-12-18 08:21:00 +0000 |
---|---|---|
committer | temporal <temporal@630680e5-0e50-0410-840e-4b1c322b438d> | 2009-12-18 08:21:00 +0000 |
commit | bdbb863099c7ef3e1ecdeefa732798e095b85fb8 (patch) | |
tree | 221b358332016ecb81d2da4f7529be0cdaef1e1f /src/google/protobuf/message.cc | |
parent | 91218afc67773ebf85e37d91c80cb3a7d423b0ba (diff) | |
download | protobuf-bdbb863099c7ef3e1ecdeefa732798e095b85fb8.tar.gz protobuf-bdbb863099c7ef3e1ecdeefa732798e095b85fb8.tar.bz2 protobuf-bdbb863099c7ef3e1ecdeefa732798e095b85fb8.zip |
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!
Diffstat (limited to 'src/google/protobuf/message.cc')
-rw-r--r-- | src/google/protobuf/message.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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_; |