Skip to content

Commit

Permalink
Add API guard directives for native build
Browse files Browse the repository at this point in the history
  • Loading branch information
kateinoigakukun committed Sep 30, 2022
1 parent 3037a07 commit ef397f4
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ import JavaScriptEventLoop

// This module just expose 'JavaScriptEventLoop.installGlobalExecutor' to C ABI
// See _CJavaScriptEventLoopTestSupport.c for why this is needed

#if compiler(>=5.5)

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
@_cdecl("swift_javascriptkit_activate_js_executor_impl")
func swift_javascriptkit_activate_js_executor_impl() {
JavaScriptEventLoop.installGlobalExecutor()
}

#endif

0 comments on commit ef397f4

Please sign in to comment.