s/MAX_STATIC_CONSTRUCTOR_PRIORITY/FOLLY_STATIC_CTOR_PRIORITY_MAX/g
authorYedidya Feldblum <yfeldblum@fb.com>
Mon, 28 Mar 2016 23:44:02 +0000 (16:44 -0700)
committerFacebook Github Bot 0 <facebook-github-bot-0-bot@fb.com>
Mon, 28 Mar 2016 23:50:33 +0000 (16:50 -0700)
Summary:[Folly] `s/MAX_STATIC_CONSTRUCTOR_PRIORITY/FOLLY_STATIC_CTOR_PRIORITY_MAX/g`.

Namespace it with a `FOLLY_` prefix - when Folly introduces its own symbols, it is best when they are namespaced.

And stick `_MAX` at the end. Reads a bit more hierarchically to me that way.

Reviewed By: andriigrynenko

Differential Revision: D3095964

fb-gh-sync-id: 4ac8c00c03c8bd146fad9be96ce3849830504d96
fbshipit-source-id: 4ac8c00c03c8bd146fad9be96ce3849830504d96

folly/Portability.h
folly/detail/ThreadLocalDetail.cpp

index 1b6ce9dbacb050edc43d88e800ea2f2d96f7f1a3..fb4a69968497ef9e8975e78e6fcaee0cb053ceb4 100644 (file)
@@ -370,12 +370,12 @@ inline size_t malloc_usable_size(void* ptr) {
 #endif
 
 #if defined(__APPLE__) || defined(_MSC_VER)
-#define MAX_STATIC_CONSTRUCTOR_PRIORITY
+#define FOLLY_STATIC_CTOR_PRIORITY_MAX
 #else
 // 101 is the highest priority allowed by the init_priority attribute.
 // This priority is already used by JEMalloc and other memory allocators so
 // we will take the next one.
-#define MAX_STATIC_CONSTRUCTOR_PRIORITY __attribute__ ((__init_priority__(102)))
+#define FOLLY_STATIC_CTOR_PRIORITY_MAX __attribute__((__init_priority__(102)))
 #endif
 
 #endif // FOLLY_PORTABILITY_H_
index afe7c58415c3d943d330d35a29c99b06ba6f9498..fcee5c7e4ee5eb5c7e60ea24d1026edf245a0b97 100644 (file)
@@ -223,6 +223,6 @@ ElementWrapper& StaticMetaBase::get(EntryID* ent) {
   return threadEntry->elements[id];
 }
 
-MAX_STATIC_CONSTRUCTOR_PRIORITY
+FOLLY_STATIC_CTOR_PRIORITY_MAX
 PthreadKeyUnregister PthreadKeyUnregister::instance_;
 }}