File tree Expand file tree Collapse file tree 2 files changed +4
-15
lines changed Expand file tree Collapse file tree 2 files changed +4
-15
lines changed Original file line number Diff line number Diff line change @@ -2,17 +2,13 @@ enum LibraryFeatures {
22 static let weakRefs : Int32 = 1 << 0
33}
44
5- @_cdecl ( " _library_features " )
6- func _library_features( ) -> Int32 {
5+ @_expose ( wasm, " swjs_library_features " )
6+ @_cdecl ( " _swjs_library_features " )
7+ @available ( * , unavailable)
8+ public func _swjs_library_features( ) -> Int32 {
79 var features : Int32 = 0
810#if !JAVASCRIPTKIT_WITHOUT_WEAKREFS
911 features |= LibraryFeatures . weakRefs
1012#endif
1113 return features
1214}
13-
14- #if compiler(>=6.0) && hasFeature(Embedded)
15- // cdecls currently don't work in embedded, and expose for wasm only works >=6.0
16- @_expose ( wasm, " swjs_library_features " )
17- public func _swjs_library_features( ) -> Int32 { _library_features ( ) }
18- #endif
Original file line number Diff line number Diff line change @@ -46,13 +46,6 @@ void swjs_free_host_function(const JavaScriptHostFuncRef host_func_ref) {
4646 _free_host_function_impl (host_func_ref );
4747}
4848
49- int _library_features (void );
50-
51- __attribute__((export_name ("swjs_library_features" )))
52- int swjs_library_features (void ) {
53- return _library_features ();
54- }
55-
5649int swjs_get_worker_thread_id_cached (void ) {
5750 _Thread_local static int tid = 0 ;
5851 if (tid == 0 ) {
You can’t perform that action at this time.
0 commit comments