Skip to content

Commit

Permalink
Type global hooks as function pointers
Browse files Browse the repository at this point in the history
Reviewed By: danzimm

Differential Revision: D6568053

fbshipit-source-id: 94fdecaf066a36c9c916bbd7b23c2f0680d91895
  • Loading branch information
johnislarry authored and facebook-github-bot committed Dec 14, 2017
1 parent 2fecbf6 commit eca51eb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ReactCommon/cxxreact/Platform.h
Expand Up @@ -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);
Expand All @@ -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;

}
Expand Down

0 comments on commit eca51eb

Please sign in to comment.