Skip to content

Commit 77bbc8c

Browse files
committed
added compiler gates for @_expose
1 parent 025b9fc commit 77bbc8c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/JavaScriptKit/Features.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ func _library_features() -> Int32 {
1111
return features
1212
}
1313

14-
#if hasFeature(Embedded)
14+
#if compiler(>=6.0) && hasFeature(Embedded)
1515
// cdecls currently don't work in embedded, and expose for wasm only works >=6.0
1616
@_expose(wasm, "swjs_library_features")
1717
public func _swjs_library_features() -> Int32 { _library_features() }

Sources/JavaScriptKit/FundamentalObjects/JSClosure.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ func _free_host_function_impl(_ hostFuncRef: JavaScriptHostFuncRef) {
236236
}
237237
#endif
238238

239-
#if hasFeature(Embedded)
239+
#if compiler(>=6.0) && hasFeature(Embedded)
240240
// cdecls currently don't work in embedded, and expose for wasm only works >=6.0
241241
@_expose(wasm, "swjs_call_host_function")
242242
public func _swjs_call_host_function(

0 commit comments

Comments
 (0)