Skip to content

Commit 710a5e3

Browse files
committedAug 5, 2023
Restrict wasi attributes to wasi builds
Added simply to silence unknown attribute warnings when building for macOS using Xcode.
1 parent 64c9526 commit 710a5e3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎Sources/_CJavaScriptBigIntSupport/include/_CJavaScriptKit+I64.h

+4
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,20 @@
88
///
99
/// @param value The value to convert.
1010
/// @param is_signed Whether to treat the value as a signed integer or not.
11+
#if __wasi__
1112
__attribute__((__import_module__("javascript_kit"),
1213
__import_name__("swjs_i64_to_bigint")))
14+
#endif
1315
extern JavaScriptObjectRef _i64_to_bigint(const long long value, bool is_signed);
1416

1517
/// Converts the provided BigInt to an Int64 or UInt64.
1618
///
1719
/// @param ref The target JavaScript object.
1820
/// @param is_signed Whether to treat the return value as a signed integer or not.
21+
#if __wasi__
1922
__attribute__((__import_module__("javascript_kit"),
2023
__import_name__("swjs_bigint_to_i64")))
24+
#endif
2125
extern long long _bigint_to_i64(const JavaScriptObjectRef ref, bool is_signed);
2226

2327
#endif /* _CJavaScriptBigIntSupport_h */

0 commit comments

Comments
 (0)