Commit f837b006 authored by temporal's avatar temporal

Use the nice macro to declare once-init control objects, like good little coders…

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.
parent 9270a99d
...@@ -798,7 +798,7 @@ namespace { ...@@ -798,7 +798,7 @@ namespace {
EncodedDescriptorDatabase* generated_database_ = NULL; EncodedDescriptorDatabase* generated_database_ = NULL;
DescriptorPool* generated_pool_ = NULL; DescriptorPool* generated_pool_ = NULL;
GoogleOnceType generated_pool_init_; GOOGLE_PROTOBUF_DECLARE_ONCE(generated_pool_init_);
void DeleteGeneratedPool() { void DeleteGeneratedPool() {
delete generated_database_; delete generated_database_;
......
...@@ -76,7 +76,7 @@ struct ExtensionInfo { ...@@ -76,7 +76,7 @@ struct ExtensionInfo {
typedef hash_map<pair<const MessageLite*, int>, typedef hash_map<pair<const MessageLite*, int>,
ExtensionInfo> ExtensionRegistry; ExtensionInfo> ExtensionRegistry;
ExtensionRegistry* registry_ = NULL; ExtensionRegistry* registry_ = NULL;
GoogleOnceType registry_init_; GOOGLE_PROTOBUF_DECLARE_ONCE(registry_init_);
void DeleteRegistry() { void DeleteRegistry() {
delete registry_; delete registry_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment