Use the nice macro to declare once-init control objects, like good little coders should. Otherwise the initialization routines never run on Mac. TODO: Investigate how this was broken.

pull/3335/head
temporal 16 years ago
parent 9270a99d2e
commit f837b0066d
  1. 2
      src/google/protobuf/descriptor.cc
  2. 2
      src/google/protobuf/extension_set.cc

@ -798,7 +798,7 @@ namespace {
EncodedDescriptorDatabase* generated_database_ = NULL;
DescriptorPool* generated_pool_ = NULL;
GoogleOnceType generated_pool_init_;
GOOGLE_PROTOBUF_DECLARE_ONCE(generated_pool_init_);
void DeleteGeneratedPool() {
delete generated_database_;

@ -76,7 +76,7 @@ struct ExtensionInfo {
typedef hash_map<pair<const MessageLite*, int>,
ExtensionInfo> ExtensionRegistry;
ExtensionRegistry* registry_ = NULL;
GoogleOnceType registry_init_;
GOOGLE_PROTOBUF_DECLARE_ONCE(registry_init_);
void DeleteRegistry() {
delete registry_;

Loading…
Cancel
Save