Skip to content

Commit eca51eb

Browse files
johnislarryfacebook-github-bot
authored andcommitted
Type global hooks as function pointers
Reviewed By: danzimm Differential Revision: D6568053 fbshipit-source-id: 94fdecaf066a36c9c916bbd7b23c2f0680d91895
1 parent 2fecbf6 commit eca51eb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ReactCommon/cxxreact/Platform.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ enum ReactMarkerId {
3131
NATIVE_MODULE_SETUP_STOP,
3232
};
3333

34+
#ifdef __APPLE__
3435
using LogTaggedMarker = std::function<void(const ReactMarkerId, const char* tag)>;
36+
#else
37+
typedef void(*LogTaggedMarker)(const ReactMarkerId, const char* tag);
38+
#endif
3539
extern RN_EXPORT LogTaggedMarker logTaggedMarker;
3640

3741
extern void logMarker(const ReactMarkerId markerId);
@@ -50,7 +54,7 @@ using Hook = JSValueRef(*)(
5054
extern RN_EXPORT Hook loggingHook;
5155
extern RN_EXPORT Hook nowHook;
5256

53-
using ConfigurationHook = std::function<void(JSGlobalContextRef)>;
57+
typedef void(*ConfigurationHook)(JSGlobalContextRef);
5458
extern RN_EXPORT ConfigurationHook installPerfHooks;
5559

5660
}

0 commit comments

Comments
 (0)