Type global hooks as function pointers

Reviewed By: danzimm

Differential Revision: D6568053

fbshipit-source-id: 94fdecaf066a36c9c916bbd7b23c2f0680d91895
This commit is contained in:
Max Sherman 2017-12-14 14:32:31 -08:00 committed by Facebook Github Bot
parent 2fecbf6171
commit eca51eb46a
1 changed files with 5 additions and 1 deletions

View File

@ -31,7 +31,11 @@ enum ReactMarkerId {
NATIVE_MODULE_SETUP_STOP,
};
#ifdef __APPLE__
using LogTaggedMarker = std::function<void(const ReactMarkerId, const char* tag)>;
#else
typedef void(*LogTaggedMarker)(const ReactMarkerId, const char* tag);
#endif
extern RN_EXPORT LogTaggedMarker logTaggedMarker;
extern void logMarker(const ReactMarkerId markerId);
@ -50,7 +54,7 @@ using Hook = JSValueRef(*)(
extern RN_EXPORT Hook loggingHook;
extern RN_EXPORT Hook nowHook;
using ConfigurationHook = std::function<void(JSGlobalContextRef)>;
typedef void(*ConfigurationHook)(JSGlobalContextRef);
extern RN_EXPORT ConfigurationHook installPerfHooks;
}