fix macro use name

This commit is contained in:
tqcq 2024-04-29 22:23:07 +08:00
parent 9a81631692
commit 90a8778f70

View File

@ -52,7 +52,7 @@ public:
if (destructor_) destructor_();
}
const char *name() const { return name_; }
const char *module_name() const { return name_; }
private:
const char *const name_;
@ -65,7 +65,7 @@ private:
GoogleInitializer google_initializer_module_##name(#name, google_init_module_##name, NULL); \
__attribute__((constructor)) static void EnsureConstructorRunsBeforeMain() \
{ \
google_initializer_module_##name.name(); \
google_initializer_module_##name.module_name(); \
} \
}