Permalink
Browse files

Type global hooks as function pointers

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 eca51eb46a47112c8933d0a3b932f59008cadc78
Showing with 5 additions and 1 deletion.
  1. +5 −1 ReactCommon/cxxreact/Platform.h
@@ -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;

}

0 comments on commit eca51eb

Please sign in to comment.