peachsim 0.1.1692 → 0.1.1700
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/bridge-flow-runner.ts +61 -39
- package/cli/commands/agent-wrapper.ts +21 -10
- package/cli/commands/control.ts +27 -7
- package/cli/commands/coverage.ts +1 -1
- package/cli/commands/detect.ts +17 -4
- package/cli/commands/maestro-compare.ts +25 -99
- package/cli/help-core.ts +3 -4
- package/cli/maestro-compare.ts +172 -4
- package/cli/outbound-endpoints.ts +2 -10
- package/detox/index.ts +15 -0
- package/detox/launch-permissions.ts +169 -0
- package/dist-lib/agent-daemon-client.cjs +2 -2
- package/dist-lib/agent-events.cjs +2 -2
- package/dist-lib/attached-projects.cjs +2 -2
- package/dist-lib/auth/shared-session.cjs +2 -2
- package/dist-lib/backend-origin.cjs +2 -2
- package/dist-lib/beta.cjs +2 -2
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +2 -2
- package/dist-lib/bridge-contract-input.cjs +2 -2
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +2 -2
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +18273 -15925
- package/dist-lib/capture-contract.cjs +2 -2
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +2 -2
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +2 -2
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +2 -2
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +2 -2
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +104 -3
- package/dist-lib/dev-bundle-resolution.cjs +208 -44
- package/dist-lib/expo-swift-bundle.cjs +2349 -1778
- package/dist-lib/expo-swift-metadata.cjs +2 -2
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +2 -2
- package/dist-lib/host/bridge-host.cjs +7885 -3334
- package/dist-lib/host/fetch-proxy-handler.cjs +331 -39
- package/dist-lib/host/fetch-proxy-overrides.cjs +2 -2
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +2 -2
- package/dist-lib/host/websocket-proxy.cjs +2 -2
- package/dist-lib/index.cjs +297 -77
- package/dist-lib/jump-to-source-babel.cjs +2 -2
- package/dist-lib/jump-to-source-native.cjs +2 -2
- package/dist-lib/kotlin-host.cjs +2 -2
- package/dist-lib/menu.cjs +2 -2
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +2 -2
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +2 -2
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +294 -74
- package/dist-lib/native-app-identity-project.cjs +48 -37
- package/dist-lib/native-app-identity-project.mjs +47 -36
- package/dist-lib/native-app-identity.cjs +2 -2
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +2 -2
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +2 -2
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +2 -2
- package/dist-lib/public-brand.cjs +2 -2
- package/dist-lib/public-origins-lib-esm.json +24 -23
- package/dist-lib/public-origins-lib.json +199 -79
- package/dist-lib/react-native-host-modules.cjs +2 -2
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +2 -2
- package/dist-lib/scripts/dev-server-scanner.cjs +206 -31
- package/dist-lib/sdk.cjs +2 -2
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +19600 -15992
- package/dist-lib/swift-compile.cjs +640 -402
- package/dist-lib/swift-compile.mjs +595 -357
- package/dist-lib/swift-package.cjs +24 -20
- package/dist-lib/swift-package.mjs +23 -19
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +31 -4
- package/dist-lib/swift.cjs +2 -2
- package/dist-lib/vite-swift.cjs +1559 -1208
- package/dist-lib/vite.cjs +251 -42
- package/dist-lib/worklet-executable.cjs +2 -2
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/scroll-pan-contacts.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +17 -0
- package/dist-types/packages/peach-engine/src/render-worker/worker-input-runtime.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +3 -0
- package/dist-types/packages/peach-globals/src/cameraBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/replayBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/shellHostBridgeContract.d.ts +3 -0
- package/dist-types/packages/peach-kit/src/materials/types.d.ts +1 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/scripts/dev-server-scanner.ts +4 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Alpha.h +2282 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/BasicImageTypes.h +55 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Conversion.h +10551 -6
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Convolution.h +4236 -3
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Geometry.h +827 -8
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Histogram.h +1369 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Morphology.h +1243 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Transform.h +1747 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage.h +291 -2
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_CVUtilities.h +1283 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Types.h +811 -91
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Utilities.h +1342 -25
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns.h +2738 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_constants.h +1685 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_graph.h +913 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_structures.h +1917 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/LinearAlgebra.h +23 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/arithmetic.h +209 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/base.h +104 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/linear_systems.h +77 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/matrix.h +554 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/norms.h +58 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/object.h +186 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/splat.h +86 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/vector.h +364 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Integration.h +195 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Quadrature.h +44 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/BLAS.h +2330 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/Types.h +123 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Solve.h +8339 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementation.h +520 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementationTyped.h +1893 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Sparse.h +10 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/blas_new.h +1098 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas.h +859 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas_new.h +1134 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/clapack.h +10555 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/fortran_blas.h +695 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack.h +38526 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_types.h +60 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_version.h +20 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/thread_api.h +50 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBasicOps.h +1218 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBigNum.h +1458 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP.h +10377 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP_translate.h +167 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vForce.h +1243 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLib.h +114 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLibTypes.h +146 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vectorOps.h +1106 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vfp.h +294 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h +25 -1
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFArray.h +673 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h +232 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h +827 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCalendar.h +121 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCharacterSet.h +387 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFData.h +79 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDate.h +122 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h +674 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFError.h +182 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFLocale.h +213 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNotificationCenter.h +82 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNumber.h +129 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFSet.h +491 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h +883 -2
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFTimeZone.h +98 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +11 -229
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +2 -6
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +2 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +1 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecBase.h +906 -3
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecCertificate.h +613 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecItem.h +1284 -29
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecPolicy.h +441 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecTrust.h +845 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/Security.h +4 -0
- package/sdk/ios/usr/include/AvailabilityMacros.h +3985 -0
- package/sdk/ios/usr/include/copyfile.h +143 -0
- package/sdk/ios/usr/include/malloc/_malloc.h +143 -0
- package/sdk/ios/usr/include/malloc/_malloc_type.h +153 -0
- package/sdk/ios/usr/include/malloc/_platform.h +80 -0
- package/sdk/ios/usr/include/malloc/_ptrcheck.h +43 -0
- package/sdk/ios/usr/include/malloc/malloc.h +768 -0
- package/sdk/ios/usr/include/os/availability.h +168 -6
- package/sdk/ios/usr/include/os/base.h +351 -0
- package/sdk/ios/usr/include/os/clock.h +18 -0
- package/sdk/ios/usr/include/os/lock.h +232 -10
- package/sdk/ios/usr/include/os/log.h +521 -38
- package/sdk/ios/usr/include/os/object.h +320 -3
- package/sdk/ios/usr/include/os/trace.h +492 -0
- package/sdk/ios/usr/include/os/trace_base.h +167 -0
- package/sdk/ios/usr/include/os/workgroup.h +37 -0
- package/sdk/ios/usr/include/os/workgroup_base.h +91 -0
- package/sdk/ios/usr/include/os/workgroup_interval.h +156 -0
- package/sdk/ios/usr/include/os/workgroup_object.h +359 -0
- package/sdk/ios/usr/include/os/workgroup_parallel.h +76 -0
- package/sdk/ios/usr/include/sys/cdefs.h +38 -0
- package/sdk/ios/wasm/include/unistd.h +3 -0
- package/skills/contrast/SKILL.md +3 -0
- package/src/codex-client.ts +11 -6
- package/src/dev-bundle-resolution.ts +124 -48
- package/src/expo-native-workspace.ts +176 -0
- package/src/expo-swift-host.ts +161 -26
- package/src/expo-swift-ready.ts +14 -28
- package/src/expoSwiftContract.ts +4 -1
- package/src/generated/swift-c-predefines.json +68 -12
- package/src/host/bridge-host.ts +5 -0
- package/src/installed-package-versions.ts +14 -1
- package/src/metro-project-root.ts +44 -33
- package/src/native-app-identity-project.ts +1 -0
- package/src/nitro-adapter.lock.json +916 -10
- package/src/nitro-adapter.ts +33 -24
- package/src/nitro-bundle.ts +108 -22
- package/src/nitro-compile.ts +32 -5
- package/src/nitro-source.ts +13 -3
- package/src/nitroAdapterContract.ts +100 -20
- package/src/node-http-fetch.ts +116 -0
- package/src/packageVersionsContract.ts +46 -0
- package/src/serverDiscoveryContract.ts +1 -0
- package/src/settingsContract.ts +0 -30
- package/src/swift-binary-modules.ts +20 -5
- package/src/swift-compile.ts +168 -48
- package/src/swift-coverage/xcode-assets.ts +4 -3
- package/src/swift-host.ts +14 -3
- package/src/swift-objc-compile.ts +32 -5
- package/src/swift-objc-metadata.ts +2 -2
- package/src/swift-objc-platform.ts +2 -2
- package/src/swift-objc-standin.ts +43 -13
- package/src/swift-package.ts +33 -26
- package/src/swift-source-pods.ts +126 -41
- package/src/swift-standin-digest.ts +77 -0
- package/src/swift-standin-emit.ts +40 -4
- package/src/swift-standins.ts +68 -19
- package/src/swift-toolchain.ts +38 -0
- package/src/swiftContract.ts +8 -0
- package/src/vite-plugin.ts +0 -10
- package/src/xcode-project.ts +62 -42
- package/src/settings-flags.ts +0 -107
|
@@ -1,133 +1,295 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2008-2017 Apple Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* @APPLE_APACHE_LICENSE_HEADER_START@
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* @APPLE_APACHE_LICENSE_HEADER_END@
|
|
19
|
+
*/
|
|
20
|
+
|
|
1
21
|
#ifndef __OS_AVAILABILITY__
|
|
2
22
|
#define __OS_AVAILABILITY__
|
|
23
|
+
|
|
24
|
+
/*
|
|
25
|
+
* API_TO_BE_DEPRECATED is used as a version number in API that will be deprecated
|
|
26
|
+
* in an upcoming release. This soft deprecation is an intermediate step before formal
|
|
27
|
+
* deprecation to notify developers about the API before compiler warnings are generated.
|
|
28
|
+
* You can find all places in your code that use soft deprecated API by redefining the
|
|
29
|
+
* value of this macro to your current minimum deployment target, for example:
|
|
30
|
+
* (macOS)
|
|
31
|
+
* clang -DAPI_TO_BE_DEPRECATED=10.12 <other compiler flags>
|
|
32
|
+
* (iOS)
|
|
33
|
+
* clang -DAPI_TO_BE_DEPRECATED=11.0 <other compiler flags>
|
|
34
|
+
*/
|
|
35
|
+
|
|
3
36
|
#ifndef API_TO_BE_DEPRECATED
|
|
4
37
|
#define API_TO_BE_DEPRECATED 100000
|
|
5
38
|
#endif
|
|
39
|
+
|
|
6
40
|
#ifndef API_TO_BE_DEPRECATED_MACOS
|
|
7
41
|
#define API_TO_BE_DEPRECATED_MACOS 100000
|
|
8
42
|
#endif
|
|
43
|
+
|
|
9
44
|
#ifndef API_TO_BE_DEPRECATED_IOS
|
|
10
45
|
#define API_TO_BE_DEPRECATED_IOS 100000
|
|
11
46
|
#endif
|
|
47
|
+
|
|
12
48
|
#ifndef API_TO_BE_DEPRECATED_TVOS
|
|
13
49
|
#define API_TO_BE_DEPRECATED_TVOS 100000
|
|
14
50
|
#endif
|
|
51
|
+
|
|
15
52
|
#ifndef API_TO_BE_DEPRECATED_WATCHOS
|
|
16
53
|
#define API_TO_BE_DEPRECATED_WATCHOS 100000
|
|
17
54
|
#endif
|
|
55
|
+
|
|
18
56
|
#ifndef __API_TO_BE_DEPRECATED_BRIDGEOS
|
|
57
|
+
|
|
19
58
|
#endif
|
|
59
|
+
|
|
20
60
|
#ifndef __API_TO_BE_DEPRECATED_MACCATALYST
|
|
21
61
|
#define __API_TO_BE_DEPRECATED_MACCATALYST 100000
|
|
22
62
|
#endif
|
|
63
|
+
|
|
23
64
|
#ifndef API_TO_BE_DEPRECATED_DRIVERKIT
|
|
24
65
|
#define API_TO_BE_DEPRECATED_DRIVERKIT 100000
|
|
25
66
|
#endif
|
|
67
|
+
|
|
26
68
|
#ifndef API_TO_BE_DEPRECATED_VISIONOS
|
|
27
69
|
#define API_TO_BE_DEPRECATED_VISIONOS 100000
|
|
28
70
|
#endif
|
|
71
|
+
|
|
29
72
|
#ifndef __OPEN_SOURCE__
|
|
30
|
-
|
|
73
|
+
|
|
74
|
+
#endif /* __OPEN_SOURCE__ */
|
|
75
|
+
|
|
31
76
|
#include <AvailabilityInternal.h>
|
|
32
77
|
#include <AvailabilityInternalLegacy.h>
|
|
33
78
|
#if __has_include(<AvailabilityInternalPrivate.h>)
|
|
34
79
|
#include <AvailabilityInternalPrivate.h>
|
|
35
80
|
#endif
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
36
84
|
#if defined(__has_feature) && defined(__has_attribute)
|
|
37
85
|
#if __has_attribute(availability)
|
|
86
|
+
|
|
87
|
+
/*
|
|
88
|
+
* API Introductions
|
|
89
|
+
*
|
|
90
|
+
* Use to specify the release that a particular API became available.
|
|
91
|
+
*
|
|
92
|
+
* Platform names:
|
|
93
|
+
* macos, macOSApplicationExtension, macCatalyst, macCatalystApplicationExtension,
|
|
94
|
+
* ios, iOSApplicationExtension, tvos, tvOSApplicationExtension, watchos,
|
|
95
|
+
* watchOSApplicationExtension, driverkit, visionos, visionOSApplicationExtension
|
|
96
|
+
*
|
|
97
|
+
* Examples:
|
|
98
|
+
* API_AVAILABLE(macos(10.10))
|
|
99
|
+
* API_AVAILABLE(macos(10.9), ios(10.0))
|
|
100
|
+
* API_AVAILABLE(macos(10.4), ios(8.0), watchos(2.0), tvos(10.0))
|
|
101
|
+
* API_AVAILABLE(driverkit(19.0))
|
|
102
|
+
*/
|
|
103
|
+
|
|
38
104
|
#define API_AVAILABLE(...) __API_AVAILABLE_GET_MACRO_93585900(__VA_ARGS__,__API_AVAILABLE15,__API_AVAILABLE14,__API_AVAILABLE13,__API_AVAILABLE12,__API_AVAILABLE11,__API_AVAILABLE10,__API_AVAILABLE9,__API_AVAILABLE8,__API_AVAILABLE7,__API_AVAILABLE6,__API_AVAILABLE5,__API_AVAILABLE4,__API_AVAILABLE3,__API_AVAILABLE2,__API_AVAILABLE1,__API_AVAILABLE0,0)(__VA_ARGS__)
|
|
39
105
|
#define API_AVAILABLE_BEGIN(...) _Pragma("clang attribute push") __API_AVAILABLE_BEGIN_GET_MACRO_93585900(__VA_ARGS__,__API_AVAILABLE_BEGIN15,__API_AVAILABLE_BEGIN14,__API_AVAILABLE_BEGIN13,__API_AVAILABLE_BEGIN12,__API_AVAILABLE_BEGIN11,__API_AVAILABLE_BEGIN10,__API_AVAILABLE_BEGIN9,__API_AVAILABLE_BEGIN8,__API_AVAILABLE_BEGIN7,__API_AVAILABLE_BEGIN6,__API_AVAILABLE_BEGIN5,__API_AVAILABLE_BEGIN4,__API_AVAILABLE_BEGIN3,__API_AVAILABLE_BEGIN2,__API_AVAILABLE_BEGIN1,__API_AVAILABLE_BEGIN0,0)(__VA_ARGS__)
|
|
40
106
|
#define API_AVAILABLE_END _Pragma("clang attribute pop")
|
|
107
|
+
|
|
108
|
+
/*
|
|
109
|
+
* API Deprecations
|
|
110
|
+
*
|
|
111
|
+
* Use to specify the release that a particular API became deprecated.
|
|
112
|
+
*
|
|
113
|
+
* Platform names:
|
|
114
|
+
* macos, macOSApplicationExtension, macCatalyst, macCatalystApplicationExtension,
|
|
115
|
+
* ios, iOSApplicationExtension, tvos, tvOSApplicationExtension, watchos,
|
|
116
|
+
* watchOSApplicationExtension, driverkit, visionos, visionOSApplicationExtension
|
|
117
|
+
*
|
|
118
|
+
* Within each platform a tuple of versions will represent the version the API was
|
|
119
|
+
* introduced in, followed by the version it was deperecated in.
|
|
120
|
+
*
|
|
121
|
+
* Examples:
|
|
122
|
+
*
|
|
123
|
+
* API_DEPRECATED("Deprecated", macos(10.4, 10.8))
|
|
124
|
+
* API_DEPRECATED("Deprecated", macos(10.4, 10.8), ios(2.0, 3.0), watchos(2.0, 3.0), tvos(9.0, 10.0))
|
|
125
|
+
*
|
|
126
|
+
* API_DEPRECATED_WITH_REPLACEMENT("-setName:", tvos(10.0, 10.4), ios(9.0, 10.0))
|
|
127
|
+
* API_DEPRECATED_WITH_REPLACEMENT("SomeClassName", macos(10.4, 10.6), watchos(2.0, 3.0))
|
|
128
|
+
*/
|
|
129
|
+
|
|
41
130
|
#define API_DEPRECATED(...) __API_DEPRECATED_MSG_GET_MACRO_93585900(__VA_ARGS__,__API_DEPRECATED_MSG15,__API_DEPRECATED_MSG14,__API_DEPRECATED_MSG13,__API_DEPRECATED_MSG12,__API_DEPRECATED_MSG11,__API_DEPRECATED_MSG10,__API_DEPRECATED_MSG9,__API_DEPRECATED_MSG8,__API_DEPRECATED_MSG7,__API_DEPRECATED_MSG6,__API_DEPRECATED_MSG5,__API_DEPRECATED_MSG4,__API_DEPRECATED_MSG3,__API_DEPRECATED_MSG2,__API_DEPRECATED_MSG1,__API_DEPRECATED_MSG0,0,0)(__VA_ARGS__)
|
|
42
131
|
#define API_DEPRECATED_WITH_REPLACEMENT(...) __API_DEPRECATED_REP_GET_MACRO_93585900(__VA_ARGS__,__API_DEPRECATED_REP15,__API_DEPRECATED_REP14,__API_DEPRECATED_REP13,__API_DEPRECATED_REP12,__API_DEPRECATED_REP11,__API_DEPRECATED_REP10,__API_DEPRECATED_REP9,__API_DEPRECATED_REP8,__API_DEPRECATED_REP7,__API_DEPRECATED_REP6,__API_DEPRECATED_REP5,__API_DEPRECATED_REP4,__API_DEPRECATED_REP3,__API_DEPRECATED_REP2,__API_DEPRECATED_REP1,__API_DEPRECATED_REP0,0,0)(__VA_ARGS__)
|
|
132
|
+
|
|
43
133
|
#define API_DEPRECATED_BEGIN(...) _Pragma("clang attribute push") __API_DEPRECATED_BEGIN_GET_MACRO_93585900(__VA_ARGS__,__API_DEPRECATED_BEGIN15,__API_DEPRECATED_BEGIN14,__API_DEPRECATED_BEGIN13,__API_DEPRECATED_BEGIN12,__API_DEPRECATED_BEGIN11,__API_DEPRECATED_BEGIN10,__API_DEPRECATED_BEGIN9,__API_DEPRECATED_BEGIN8,__API_DEPRECATED_BEGIN7,__API_DEPRECATED_BEGIN6,__API_DEPRECATED_BEGIN5,__API_DEPRECATED_BEGIN4,__API_DEPRECATED_BEGIN3,__API_DEPRECATED_BEGIN2,__API_DEPRECATED_BEGIN1,__API_DEPRECATED_BEGIN0,0,0)(__VA_ARGS__)
|
|
44
134
|
#define API_DEPRECATED_END _Pragma("clang attribute pop")
|
|
135
|
+
|
|
45
136
|
#define API_DEPRECATED_WITH_REPLACEMENT_BEGIN(...) _Pragma("clang attribute push") __API_DEPRECATED_WITH_REPLACEMENT_BEGIN_GET_MACRO_93585900(__VA_ARGS__,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN15,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN14,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN13,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN12,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN11,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN10,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN9,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN8,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN7,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN6,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN5,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN4,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN3,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN2,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN1,__API_DEPRECATED_WITH_REPLACEMENT_BEGIN0,0,0)(__VA_ARGS__)
|
|
46
137
|
#define API_DEPRECATED_WITH_REPLACEMENT_END _Pragma("clang attribute pop")
|
|
138
|
+
|
|
139
|
+
/*
|
|
140
|
+
* API Obsoletions
|
|
141
|
+
*
|
|
142
|
+
* Use to specify the release that a particular API became unavailable.
|
|
143
|
+
*
|
|
144
|
+
* Platform names:
|
|
145
|
+
* macos, macOSApplicationExtension, macCatalyst, macCatalystApplicationExtension,
|
|
146
|
+
* ios, iOSApplicationExtension, tvos, tvOSApplicationExtension, watchos,
|
|
147
|
+
* watchOSApplicationExtension, driverkit, visionos, visionOSApplicationExtension
|
|
148
|
+
*
|
|
149
|
+
* Within each platform a tuple of versions will represent the version the API was
|
|
150
|
+
* introduced in, followed by the version it was deperecated in, and finally the version it
|
|
151
|
+
* was removed in.
|
|
152
|
+
*
|
|
153
|
+
* Examples:
|
|
154
|
+
*
|
|
155
|
+
* API_OBSOLETED("No longer supported", macos(10.4, 10.8, 11.0))
|
|
156
|
+
* API_OBSOLETED("No longer supported", macos(10.4, 10.8, 11.0), ios(2.0, 3.0, 4.0), watchos(2.0, 3.0, 4.0), tvos(9.0, 10.0, 11.0))
|
|
157
|
+
*
|
|
158
|
+
* API_OBSOLETED_WITH_REPLACEMENT("-setName:", tvos(10.0, 10.4, 12.0), ios(9.0, 10.0, 11.0))
|
|
159
|
+
* API_OBSOLETED_WITH_REPLACEMENT("SomeClassName", macos(10.4, 10.6, 11.0), watchos(2.0, 3.0, 4.0))
|
|
160
|
+
*/
|
|
161
|
+
|
|
47
162
|
#define API_OBSOLETED(...) __API_OBSOLETED_MSG_GET_MACRO_93585900(__VA_ARGS__,__API_OBSOLETED_MSG15,__API_OBSOLETED_MSG14,__API_OBSOLETED_MSG13,__API_OBSOLETED_MSG12,__API_OBSOLETED_MSG11,__API_OBSOLETED_MSG10,__API_OBSOLETED_MSG9,__API_OBSOLETED_MSG8,__API_OBSOLETED_MSG7,__API_OBSOLETED_MSG6,__API_OBSOLETED_MSG5,__API_OBSOLETED_MSG4,__API_OBSOLETED_MSG3,__API_OBSOLETED_MSG2,__API_OBSOLETED_MSG1,__API_OBSOLETED_MSG0,0,0)(__VA_ARGS__)
|
|
48
163
|
#define API_OBSOLETED_WITH_REPLACEMENT(...) __API_OBSOLETED_REP_GET_MACRO_93585900(__VA_ARGS__,__API_OBSOLETED_REP15,__API_OBSOLETED_REP14,__API_OBSOLETED_REP13,__API_OBSOLETED_REP12,__API_OBSOLETED_REP11,__API_OBSOLETED_REP10,__API_OBSOLETED_REP9,__API_OBSOLETED_REP8,__API_OBSOLETED_REP7,__API_OBSOLETED_REP6,__API_OBSOLETED_REP5,__API_OBSOLETED_REP4,__API_OBSOLETED_REP3,__API_OBSOLETED_REP2,__API_OBSOLETED_REP1,__API_OBSOLETED_REP0,0,0)(__VA_ARGS__)
|
|
164
|
+
|
|
49
165
|
#define API_OBSOLETED_BEGIN(...) _Pragma("clang attribute push") __API_OBSOLETED_BEGIN_GET_MACRO_93585900(__VA_ARGS__,__API_OBSOLETED_BEGIN15,__API_OBSOLETED_BEGIN14,__API_OBSOLETED_BEGIN13,__API_OBSOLETED_BEGIN12,__API_OBSOLETED_BEGIN11,__API_OBSOLETED_BEGIN10,__API_OBSOLETED_BEGIN9,__API_OBSOLETED_BEGIN8,__API_OBSOLETED_BEGIN7,__API_OBSOLETED_BEGIN6,__API_OBSOLETED_BEGIN5,__API_OBSOLETED_BEGIN4,__API_OBSOLETED_BEGIN3,__API_OBSOLETED_BEGIN2,__API_OBSOLETED_BEGIN1,__API_OBSOLETED_BEGIN0,0,0)(__VA_ARGS__)
|
|
50
166
|
#define API_OBSOLETED_END _Pragma("clang attribute pop")
|
|
167
|
+
|
|
51
168
|
#define API_OBSOLETED_WITH_REPLACEMENT_BEGIN(...) _Pragma("clang attribute push") __API_OBSOLETED_WITH_REPLACEMENT_BEGIN_GET_MACRO_93585900(__VA_ARGS__,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN15,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN14,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN13,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN12,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN11,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN10,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN9,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN8,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN7,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN6,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN5,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN4,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN3,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN2,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN1,__API_OBSOLETED_WITH_REPLACEMENT_BEGIN0,0,0)(__VA_ARGS__)
|
|
52
169
|
#define API_OBSOLETED_WITH_REPLACEMENT_END _Pragma("clang attribute pop")
|
|
170
|
+
|
|
171
|
+
/*
|
|
172
|
+
* API Unavailability
|
|
173
|
+
* Use to specify that an API is unavailable for a particular platform.
|
|
174
|
+
*
|
|
175
|
+
* Example:
|
|
176
|
+
* API_UNAVAILABLE(macos)
|
|
177
|
+
* API_UNAVAILABLE(watchos, tvos)
|
|
178
|
+
*/
|
|
179
|
+
|
|
53
180
|
#define API_UNAVAILABLE(...) __API_UNAVAILABLE_GET_MACRO_93585900(__VA_ARGS__,__API_UNAVAILABLE15,__API_UNAVAILABLE14,__API_UNAVAILABLE13,__API_UNAVAILABLE12,__API_UNAVAILABLE11,__API_UNAVAILABLE10,__API_UNAVAILABLE9,__API_UNAVAILABLE8,__API_UNAVAILABLE7,__API_UNAVAILABLE6,__API_UNAVAILABLE5,__API_UNAVAILABLE4,__API_UNAVAILABLE3,__API_UNAVAILABLE2,__API_UNAVAILABLE1,__API_UNAVAILABLE0,0)(__VA_ARGS__)
|
|
181
|
+
|
|
54
182
|
#define API_UNAVAILABLE_BEGIN(...) _Pragma("clang attribute push") __API_UNAVAILABLE_BEGIN_GET_MACRO_93585900(__VA_ARGS__,__API_UNAVAILABLE_BEGIN15,__API_UNAVAILABLE_BEGIN14,__API_UNAVAILABLE_BEGIN13,__API_UNAVAILABLE_BEGIN12,__API_UNAVAILABLE_BEGIN11,__API_UNAVAILABLE_BEGIN10,__API_UNAVAILABLE_BEGIN9,__API_UNAVAILABLE_BEGIN8,__API_UNAVAILABLE_BEGIN7,__API_UNAVAILABLE_BEGIN6,__API_UNAVAILABLE_BEGIN5,__API_UNAVAILABLE_BEGIN4,__API_UNAVAILABLE_BEGIN3,__API_UNAVAILABLE_BEGIN2,__API_UNAVAILABLE_BEGIN1,__API_UNAVAILABLE_BEGIN0,0)(__VA_ARGS__)
|
|
55
183
|
#define API_UNAVAILABLE_END _Pragma("clang attribute pop")
|
|
56
|
-
#endif
|
|
57
|
-
#endif
|
|
184
|
+
#endif /* __has_attribute(availability) */
|
|
185
|
+
#endif /* #if defined(__has_feature) && defined(__has_attribute) */
|
|
186
|
+
|
|
187
|
+
/*
|
|
188
|
+
* Evaluate to nothing for compilers that don't support clang language extensions.
|
|
189
|
+
*/
|
|
190
|
+
|
|
58
191
|
#ifndef API_AVAILABLE
|
|
59
192
|
#define API_AVAILABLE(...)
|
|
60
193
|
#endif
|
|
194
|
+
|
|
61
195
|
#ifndef API_AVAILABLE_BEGIN
|
|
62
196
|
#define API_AVAILABLE_BEGIN(...)
|
|
63
197
|
#endif
|
|
198
|
+
|
|
64
199
|
#ifndef API_AVAILABLE_END
|
|
65
200
|
#define API_AVAILABLE_END
|
|
66
201
|
#endif
|
|
202
|
+
|
|
67
203
|
#ifndef API_DEPRECATED
|
|
68
204
|
#define API_DEPRECATED(...)
|
|
69
205
|
#endif
|
|
206
|
+
|
|
70
207
|
#ifndef API_DEPRECATED_BEGIN
|
|
71
208
|
#define API_DEPRECATED_BEGIN(...)
|
|
72
209
|
#endif
|
|
210
|
+
|
|
73
211
|
#ifndef API_DEPRECATED_END
|
|
74
212
|
#define API_DEPRECATED_END
|
|
75
213
|
#endif
|
|
214
|
+
|
|
76
215
|
#ifndef API_DEPRECATED_WITH_REPLACEMENT
|
|
77
216
|
#define API_DEPRECATED_WITH_REPLACEMENT(...)
|
|
78
217
|
#endif
|
|
218
|
+
|
|
79
219
|
#ifndef API_DEPRECATED_WITH_REPLACEMENT_BEGIN
|
|
80
220
|
#define API_DEPRECATED_WITH_REPLACEMENT_BEGIN(...)
|
|
81
221
|
#endif
|
|
222
|
+
|
|
82
223
|
#ifndef API_DEPRECATED_WITH_REPLACEMENT_END
|
|
83
224
|
#define API_DEPRECATED_WITH_REPLACEMENT_END
|
|
84
225
|
#endif
|
|
226
|
+
|
|
85
227
|
#ifndef API_OBSOLETED
|
|
86
228
|
#define API_OBSOLETED(...)
|
|
87
229
|
#endif
|
|
230
|
+
|
|
88
231
|
#ifndef API_OBSOLETED_BEGIN
|
|
89
232
|
#define API_OBSOLETED_BEGIN(...)
|
|
90
233
|
#endif
|
|
234
|
+
|
|
91
235
|
#ifndef API_OBSOLETED_END
|
|
92
236
|
#define API_OBSOLETED_END
|
|
93
237
|
#endif
|
|
238
|
+
|
|
94
239
|
#ifndef API_OBSOLETED_WITH_REPLACEMENT
|
|
95
240
|
#define API_OBSOLETED_WITH_REPLACEMENT(...)
|
|
96
241
|
#endif
|
|
242
|
+
|
|
97
243
|
#ifndef API_OBSOLETED_WITH_REPLACEMENT_BEGIN
|
|
98
244
|
#define API_OBSOLETED_WITH_REPLACEMENT_BEGIN(...)
|
|
99
245
|
#endif
|
|
246
|
+
|
|
100
247
|
#ifndef API_OBSOLETED_WITH_REPLACEMENT_END
|
|
101
248
|
#define API_OBSOLETED_WITH_REPLACEMENT_END
|
|
102
249
|
#endif
|
|
250
|
+
|
|
103
251
|
#ifndef API_UNAVAILABLE
|
|
104
252
|
#define API_UNAVAILABLE(...)
|
|
105
253
|
#endif
|
|
254
|
+
|
|
106
255
|
#ifndef API_UNAVAILABLE_BEGIN
|
|
107
256
|
#define API_UNAVAILABLE_BEGIN(...)
|
|
108
257
|
#endif
|
|
258
|
+
|
|
109
259
|
#ifndef API_UNAVAILABLE_END
|
|
110
260
|
#define API_UNAVAILABLE_END
|
|
111
261
|
#endif
|
|
262
|
+
|
|
112
263
|
#if __has_include(<AvailabilityProhibitedInternal.h>)
|
|
113
264
|
#include <AvailabilityProhibitedInternal.h>
|
|
114
265
|
#endif
|
|
266
|
+
|
|
267
|
+
/*
|
|
268
|
+
* If SPI decorations have not been defined elsewhere, disable them.
|
|
269
|
+
*/
|
|
270
|
+
|
|
115
271
|
#ifndef SPI_AVAILABLE
|
|
116
272
|
#define SPI_AVAILABLE(...)
|
|
117
273
|
#endif
|
|
274
|
+
|
|
118
275
|
#ifndef SPI_AVAILABLE_BEGIN
|
|
119
276
|
#define SPI_AVAILABLE_BEGIN(...)
|
|
120
277
|
#endif
|
|
278
|
+
|
|
121
279
|
#ifndef SPI_AVAILABLE_END
|
|
122
280
|
#define SPI_AVAILABLE_END
|
|
123
281
|
#endif
|
|
282
|
+
|
|
124
283
|
#ifndef SPI_DEPRECATED
|
|
125
284
|
#define SPI_DEPRECATED(...)
|
|
126
285
|
#endif
|
|
286
|
+
|
|
127
287
|
#ifndef SPI_DEPRECATED_WITH_REPLACEMENT
|
|
128
288
|
#define SPI_DEPRECATED_WITH_REPLACEMENT(...)
|
|
129
289
|
#endif
|
|
130
|
-
|
|
290
|
+
|
|
291
|
+
#endif /* __OS_AVAILABILITY__ */
|
|
292
|
+
|
|
131
293
|
#ifndef __OPEN_SOURCE__
|
|
132
294
|
// This is explicitly outside the header guard
|
|
133
295
|
#ifndef __AVAILABILITY_VERSIONS_VERSION_HASH
|
|
@@ -136,5 +298,5 @@
|
|
|
136
298
|
#define __AVAILABILITY_FILE "os/availability.h"
|
|
137
299
|
#elif __AVAILABILITY_VERSIONS_VERSION_HASH != 93585900U
|
|
138
300
|
#pragma GCC error "Already found AvailabilityVersions version " __AVAILABILITY_FILE " from " __AVAILABILITY_VERSIONS_VERSION_STRING ", which is incompatible with os/availability.h from Local. Mixing and matching Availability from different SDKs is not supported"
|
|
139
|
-
#endif
|
|
140
|
-
#endif
|
|
301
|
+
#endif /* __AVAILABILITY_VERSIONS_VERSION_HASH */
|
|
302
|
+
#endif /* __OPEN_SOURCE__ */
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2008-2020 Apple Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* @APPLE_APACHE_LICENSE_HEADER_START@
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* @APPLE_APACHE_LICENSE_HEADER_END@
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
#ifndef __OS_BASE__
|
|
22
|
+
#define __OS_BASE__
|
|
23
|
+
|
|
24
|
+
#include <sys/cdefs.h>
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
#ifndef __has_builtin
|
|
28
|
+
#define __has_builtin(x) 0
|
|
29
|
+
#endif
|
|
30
|
+
#ifndef __has_include
|
|
31
|
+
#define __has_include(x) 0
|
|
32
|
+
#endif
|
|
33
|
+
#ifndef __has_feature
|
|
34
|
+
#define __has_feature(x) 0
|
|
35
|
+
#endif
|
|
36
|
+
#ifndef __has_attribute
|
|
37
|
+
#define __has_attribute(x) 0
|
|
38
|
+
#endif
|
|
39
|
+
#ifndef __has_extension
|
|
40
|
+
#define __has_extension(x) 0
|
|
41
|
+
#endif
|
|
42
|
+
|
|
43
|
+
#undef OS_INLINE // <sys/_types/_os_inline.h>
|
|
44
|
+
#if __GNUC__
|
|
45
|
+
#define OS_NORETURN __attribute__((__noreturn__))
|
|
46
|
+
#define OS_NOTHROW __attribute__((__nothrow__))
|
|
47
|
+
#define OS_NONNULL1 __attribute__((__nonnull__(1)))
|
|
48
|
+
#define OS_NONNULL2 __attribute__((__nonnull__(2)))
|
|
49
|
+
#define OS_NONNULL3 __attribute__((__nonnull__(3)))
|
|
50
|
+
#define OS_NONNULL4 __attribute__((__nonnull__(4)))
|
|
51
|
+
#define OS_NONNULL5 __attribute__((__nonnull__(5)))
|
|
52
|
+
#define OS_NONNULL6 __attribute__((__nonnull__(6)))
|
|
53
|
+
#define OS_NONNULL7 __attribute__((__nonnull__(7)))
|
|
54
|
+
#define OS_NONNULL8 __attribute__((__nonnull__(8)))
|
|
55
|
+
#define OS_NONNULL9 __attribute__((__nonnull__(9)))
|
|
56
|
+
#define OS_NONNULL10 __attribute__((__nonnull__(10)))
|
|
57
|
+
#define OS_NONNULL11 __attribute__((__nonnull__(11)))
|
|
58
|
+
#define OS_NONNULL12 __attribute__((__nonnull__(12)))
|
|
59
|
+
#define OS_NONNULL13 __attribute__((__nonnull__(13)))
|
|
60
|
+
#define OS_NONNULL14 __attribute__((__nonnull__(14)))
|
|
61
|
+
#define OS_NONNULL15 __attribute__((__nonnull__(15)))
|
|
62
|
+
#define OS_NONNULL_ALL __attribute__((__nonnull__))
|
|
63
|
+
#define OS_SENTINEL __attribute__((__sentinel__))
|
|
64
|
+
#define OS_PURE __attribute__((__pure__))
|
|
65
|
+
#define OS_CONST __attribute__((__const__))
|
|
66
|
+
#define OS_WARN_RESULT __attribute__((__warn_unused_result__))
|
|
67
|
+
#define OS_MALLOC __attribute__((__malloc__))
|
|
68
|
+
#define OS_USED __attribute__((__used__))
|
|
69
|
+
#define OS_UNUSED __attribute__((__unused__))
|
|
70
|
+
#define OS_COLD __attribute__((__cold__))
|
|
71
|
+
#define OS_WEAK __attribute__((__weak__))
|
|
72
|
+
#define OS_WEAK_IMPORT __attribute__((__weak_import__))
|
|
73
|
+
#define OS_NOINLINE __attribute__((__noinline__))
|
|
74
|
+
#ifndef __BUILDING_XNU_LIBRARY__
|
|
75
|
+
#define OS_ALWAYS_INLINE __attribute__((__always_inline__))
|
|
76
|
+
#else /* __BUILDING_XNU_LIBRARY__ */
|
|
77
|
+
#define OS_ALWAYS_INLINE
|
|
78
|
+
#endif /* __BUILDING_XNU_LIBRARY__ */
|
|
79
|
+
#define OS_TRANSPARENT_UNION __attribute__((__transparent_union__))
|
|
80
|
+
#define OS_ALIGNED(n) __attribute__((__aligned__((n))))
|
|
81
|
+
#define OS_FORMAT_PRINTF(x, y) __attribute__((__format__(printf,x,y)))
|
|
82
|
+
#define OS_EXPORT extern __attribute__((__visibility__("default")))
|
|
83
|
+
#define OS_INLINE static __inline__
|
|
84
|
+
#define OS_EXPECT(x, v) __builtin_expect((x), (v))
|
|
85
|
+
#else
|
|
86
|
+
#define OS_NORETURN
|
|
87
|
+
#define OS_NOTHROW
|
|
88
|
+
#define OS_NONNULL1
|
|
89
|
+
#define OS_NONNULL2
|
|
90
|
+
#define OS_NONNULL3
|
|
91
|
+
#define OS_NONNULL4
|
|
92
|
+
#define OS_NONNULL5
|
|
93
|
+
#define OS_NONNULL6
|
|
94
|
+
#define OS_NONNULL7
|
|
95
|
+
#define OS_NONNULL8
|
|
96
|
+
#define OS_NONNULL9
|
|
97
|
+
#define OS_NONNULL10
|
|
98
|
+
#define OS_NONNULL11
|
|
99
|
+
#define OS_NONNULL12
|
|
100
|
+
#define OS_NONNULL13
|
|
101
|
+
#define OS_NONNULL14
|
|
102
|
+
#define OS_NONNULL15
|
|
103
|
+
#define OS_NONNULL_ALL
|
|
104
|
+
#define OS_SENTINEL
|
|
105
|
+
#define OS_PURE
|
|
106
|
+
#define OS_CONST
|
|
107
|
+
#define OS_WARN_RESULT
|
|
108
|
+
#define OS_MALLOC
|
|
109
|
+
#define OS_USED
|
|
110
|
+
#define OS_UNUSED
|
|
111
|
+
#define OS_COLD
|
|
112
|
+
#define OS_WEAK
|
|
113
|
+
#define OS_WEAK_IMPORT
|
|
114
|
+
#define OS_NOINLINE
|
|
115
|
+
#define OS_ALWAYS_INLINE
|
|
116
|
+
#define OS_TRANSPARENT_UNION
|
|
117
|
+
#define OS_ALIGNED(n)
|
|
118
|
+
#define OS_FORMAT_PRINTF(x, y)
|
|
119
|
+
#define OS_EXPORT extern
|
|
120
|
+
#define OS_INLINE static inline
|
|
121
|
+
#define OS_EXPECT(x, v) (x)
|
|
122
|
+
#endif
|
|
123
|
+
|
|
124
|
+
#if __has_attribute(noescape)
|
|
125
|
+
#define OS_NOESCAPE __attribute__((__noescape__))
|
|
126
|
+
#else
|
|
127
|
+
#define OS_NOESCAPE
|
|
128
|
+
#endif
|
|
129
|
+
|
|
130
|
+
#if defined(__cplusplus) && defined(__clang__)
|
|
131
|
+
#define OS_FALLTHROUGH [[clang::fallthrough]]
|
|
132
|
+
#elif __has_attribute(fallthrough)
|
|
133
|
+
#define OS_FALLTHROUGH __attribute__((__fallthrough__))
|
|
134
|
+
#else
|
|
135
|
+
#define OS_FALLTHROUGH
|
|
136
|
+
#endif
|
|
137
|
+
|
|
138
|
+
#if __has_feature(assume_nonnull)
|
|
139
|
+
#define OS_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
|
|
140
|
+
#define OS_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end")
|
|
141
|
+
#else
|
|
142
|
+
#define OS_ASSUME_NONNULL_BEGIN
|
|
143
|
+
#define OS_ASSUME_NONNULL_END
|
|
144
|
+
#endif
|
|
145
|
+
|
|
146
|
+
#if __has_builtin(__builtin_assume)
|
|
147
|
+
#define OS_COMPILER_CAN_ASSUME(expr) __builtin_assume(expr)
|
|
148
|
+
#else
|
|
149
|
+
#define OS_COMPILER_CAN_ASSUME(expr) ((void)(expr))
|
|
150
|
+
#endif
|
|
151
|
+
|
|
152
|
+
#if __has_extension(attribute_overloadable)
|
|
153
|
+
#define OS_OVERLOADABLE __attribute__((__overloadable__))
|
|
154
|
+
#else
|
|
155
|
+
#define OS_OVERLOADABLE
|
|
156
|
+
#endif
|
|
157
|
+
|
|
158
|
+
#if __has_attribute(analyzer_suppress)
|
|
159
|
+
#define OS_ANALYZER_SUPPRESS(RADAR) __attribute__((analyzer_suppress))
|
|
160
|
+
#else
|
|
161
|
+
#define OS_ANALYZER_SUPPRESS(RADAR)
|
|
162
|
+
#endif
|
|
163
|
+
|
|
164
|
+
#if __has_attribute(enum_extensibility)
|
|
165
|
+
#define __OS_ENUM_ATTR __attribute__((enum_extensibility(open)))
|
|
166
|
+
#define __OS_ENUM_ATTR_CLOSED __attribute__((enum_extensibility(closed)))
|
|
167
|
+
#else
|
|
168
|
+
#define __OS_ENUM_ATTR
|
|
169
|
+
#define __OS_ENUM_ATTR_CLOSED
|
|
170
|
+
#endif // __has_attribute(enum_extensibility)
|
|
171
|
+
|
|
172
|
+
#if __has_attribute(flag_enum)
|
|
173
|
+
/*!
|
|
174
|
+
* Compile with -Wflag-enum and -Wassign-enum to enforce at definition and
|
|
175
|
+
* assignment, respectively, i.e. -Wflag-enum prevents you from creating new
|
|
176
|
+
* enumeration values from illegal values within the enum definition, and
|
|
177
|
+
* -Wassign-enum prevents you from assigning illegal values to a variable of the
|
|
178
|
+
* enum type.
|
|
179
|
+
*/
|
|
180
|
+
#define __OS_OPTIONS_ATTR __attribute__((flag_enum))
|
|
181
|
+
#else
|
|
182
|
+
#define __OS_OPTIONS_ATTR
|
|
183
|
+
#endif // __has_attribute(flag_enum)
|
|
184
|
+
|
|
185
|
+
#if __has_feature(objc_fixed_enum) || __has_extension(cxx_fixed_enum) || \
|
|
186
|
+
__has_extension(cxx_strong_enums)
|
|
187
|
+
#define OS_ENUM(_name, _type, ...) \
|
|
188
|
+
typedef enum : _type { __VA_ARGS__ } _name##_t
|
|
189
|
+
#define OS_CLOSED_ENUM(_name, _type, ...) \
|
|
190
|
+
typedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR_CLOSED _name##_t
|
|
191
|
+
#define OS_OPTIONS(_name, _type, ...) \
|
|
192
|
+
typedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR __OS_OPTIONS_ATTR _name##_t
|
|
193
|
+
#define OS_CLOSED_OPTIONS(_name, _type, ...) \
|
|
194
|
+
typedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR_CLOSED __OS_OPTIONS_ATTR _name##_t
|
|
195
|
+
#else
|
|
196
|
+
/*!
|
|
197
|
+
* There is unfortunately no good way in plain C to have both fixed-type enums
|
|
198
|
+
* and enforcement for clang's enum_extensibility extensions. The primary goal
|
|
199
|
+
* of these macros is to allow you to define an enum and specify its width in a
|
|
200
|
+
* single statement, and for plain C that is accomplished by defining an
|
|
201
|
+
* anonymous enum and then separately typedef'ing the requested type name to the
|
|
202
|
+
* requested underlying integer type. So the type emitted actually has no
|
|
203
|
+
* relationship at all to the enum, and therefore while the compiler could
|
|
204
|
+
* enforce enum extensibility if you used the enum type, it cannot do so if you
|
|
205
|
+
* use the "_t" type resulting from this expression.
|
|
206
|
+
*
|
|
207
|
+
* But we still define a named enum type and decorate it appropriately for you,
|
|
208
|
+
* so if you really want the enum extensibility enforcement, you can use the
|
|
209
|
+
* enum type yourself, i.e. when compiling with a C compiler:
|
|
210
|
+
*
|
|
211
|
+
* OS_CLOSED_ENUM(my_type, uint64_t,
|
|
212
|
+
* FOO,
|
|
213
|
+
* BAR,
|
|
214
|
+
* BAZ,
|
|
215
|
+
* );
|
|
216
|
+
*
|
|
217
|
+
* my_type_t mt = 98; // legal
|
|
218
|
+
* enum my_type emt = 98; // illegal
|
|
219
|
+
*
|
|
220
|
+
* But be aware that the underlying enum type's width is subject only to the C
|
|
221
|
+
* language's guarantees -- namely that it will be compatible with int, char,
|
|
222
|
+
* and unsigned char. It is not safe to rely on the size of this type.
|
|
223
|
+
*
|
|
224
|
+
* When compiling in ObjC or C++, both of the above assignments are illegal.
|
|
225
|
+
*/
|
|
226
|
+
#define __OS_ENUM_C_FALLBACK(_name, _type, ...) \
|
|
227
|
+
typedef _type _name##_t; enum _name { __VA_ARGS__ }
|
|
228
|
+
|
|
229
|
+
#define OS_ENUM(_name, _type, ...) \
|
|
230
|
+
typedef _type _name##_t; enum { __VA_ARGS__ }
|
|
231
|
+
#define OS_CLOSED_ENUM(_name, _type, ...) \
|
|
232
|
+
__OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \
|
|
233
|
+
__OS_ENUM_ATTR_CLOSED
|
|
234
|
+
#define OS_OPTIONS(_name, _type, ...) \
|
|
235
|
+
__OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \
|
|
236
|
+
__OS_ENUM_ATTR __OS_OPTIONS_ATTR
|
|
237
|
+
#define OS_CLOSED_OPTIONS(_name, _type, ...) \
|
|
238
|
+
__OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \
|
|
239
|
+
__OS_ENUM_ATTR_CLOSED __OS_OPTIONS_ATTR
|
|
240
|
+
#endif // __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums)
|
|
241
|
+
|
|
242
|
+
#if __has_feature(attribute_availability_swift)
|
|
243
|
+
// equivalent to __SWIFT_UNAVAILABLE from Availability.h
|
|
244
|
+
#define OS_SWIFT_UNAVAILABLE(_msg) \
|
|
245
|
+
__attribute__((__availability__(swift, unavailable, message=_msg)))
|
|
246
|
+
#else
|
|
247
|
+
#define OS_SWIFT_UNAVAILABLE(_msg)
|
|
248
|
+
#endif
|
|
249
|
+
|
|
250
|
+
#if __has_attribute(__swift_attr__)
|
|
251
|
+
#define OS_SWIFT_UNAVAILABLE_FROM_ASYNC(msg) \
|
|
252
|
+
__attribute__((__swift_attr__("@_unavailableFromAsync(message: \"" msg "\")")))
|
|
253
|
+
#define OS_SWIFT_NONISOLATED __attribute__((__swift_attr__("nonisolated")))
|
|
254
|
+
#define OS_SWIFT_NONISOLATED_UNSAFE __attribute__((__swift_attr__("nonisolated(unsafe)")))
|
|
255
|
+
#else
|
|
256
|
+
#define OS_SWIFT_UNAVAILABLE_FROM_ASYNC(msg)
|
|
257
|
+
#define OS_SWIFT_NONISOLATED
|
|
258
|
+
#define OS_SWIFT_NONISOLATED_UNSAFE
|
|
259
|
+
#endif
|
|
260
|
+
|
|
261
|
+
#if __has_attribute(swift_private)
|
|
262
|
+
# define OS_REFINED_FOR_SWIFT __attribute__((__swift_private__))
|
|
263
|
+
#else
|
|
264
|
+
# define OS_REFINED_FOR_SWIFT
|
|
265
|
+
#endif
|
|
266
|
+
|
|
267
|
+
#if __has_attribute(swift_name)
|
|
268
|
+
# define OS_SWIFT_NAME(_name) __attribute__((__swift_name__(#_name)))
|
|
269
|
+
#else
|
|
270
|
+
# define OS_SWIFT_NAME(_name)
|
|
271
|
+
#endif
|
|
272
|
+
|
|
273
|
+
#define __OS_STRINGIFY(s) #s
|
|
274
|
+
#define OS_STRINGIFY(s) __OS_STRINGIFY(s)
|
|
275
|
+
#define __OS_CONCAT(x, y) x ## y
|
|
276
|
+
#define OS_CONCAT(x, y) __OS_CONCAT(x, y)
|
|
277
|
+
|
|
278
|
+
#ifdef __GNUC__
|
|
279
|
+
#define os_prevent_tail_call_optimization() __asm__("")
|
|
280
|
+
#define os_is_compile_time_constant(expr) __builtin_constant_p(expr)
|
|
281
|
+
#define os_compiler_barrier() __asm__ __volatile__("" ::: "memory")
|
|
282
|
+
#else
|
|
283
|
+
#define os_prevent_tail_call_optimization() do { } while (0)
|
|
284
|
+
#define os_is_compile_time_constant(expr) 0
|
|
285
|
+
#define os_compiler_barrier() do { } while (0)
|
|
286
|
+
#endif
|
|
287
|
+
|
|
288
|
+
#if __has_attribute(not_tail_called)
|
|
289
|
+
#define OS_NOT_TAIL_CALLED __attribute__((__not_tail_called__))
|
|
290
|
+
#else
|
|
291
|
+
#define OS_NOT_TAIL_CALLED
|
|
292
|
+
#endif
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
typedef void (*os_function_t)(void *_Nullable);
|
|
296
|
+
|
|
297
|
+
#ifdef __BLOCKS__
|
|
298
|
+
/*!
|
|
299
|
+
* @typedef os_block_t
|
|
300
|
+
*
|
|
301
|
+
* @abstract
|
|
302
|
+
* Generic type for a block taking no arguments and returning no value.
|
|
303
|
+
*
|
|
304
|
+
* @discussion
|
|
305
|
+
* When not building with Objective-C ARC, a block object allocated on or
|
|
306
|
+
* copied to the heap must be released with a -[release] message or the
|
|
307
|
+
* Block_release() function.
|
|
308
|
+
*
|
|
309
|
+
* The declaration of a block literal allocates storage on the stack.
|
|
310
|
+
* Therefore, this is an invalid construct:
|
|
311
|
+
* <code>
|
|
312
|
+
* os_block_t block;
|
|
313
|
+
* if (x) {
|
|
314
|
+
* block = ^{ printf("true\n"); };
|
|
315
|
+
* } else {
|
|
316
|
+
* block = ^{ printf("false\n"); };
|
|
317
|
+
* }
|
|
318
|
+
* block(); // unsafe!!!
|
|
319
|
+
* </code>
|
|
320
|
+
*
|
|
321
|
+
* What is happening behind the scenes:
|
|
322
|
+
* <code>
|
|
323
|
+
* if (x) {
|
|
324
|
+
* struct Block __tmp_1 = ...; // setup details
|
|
325
|
+
* block = &__tmp_1;
|
|
326
|
+
* } else {
|
|
327
|
+
* struct Block __tmp_2 = ...; // setup details
|
|
328
|
+
* block = &__tmp_2;
|
|
329
|
+
* }
|
|
330
|
+
* </code>
|
|
331
|
+
*
|
|
332
|
+
* As the example demonstrates, the address of a stack variable is escaping the
|
|
333
|
+
* scope in which it is allocated. That is a classic C bug.
|
|
334
|
+
*
|
|
335
|
+
* Instead, the block literal must be copied to the heap with the Block_copy()
|
|
336
|
+
* function or by sending it a -[copy] message.
|
|
337
|
+
*/
|
|
338
|
+
typedef void (^os_block_t)(void);
|
|
339
|
+
#endif
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
#define OS_ASSUME_PTR_ABI_SINGLE_BEGIN __ASSUME_PTR_ABI_SINGLE_BEGIN
|
|
344
|
+
#define OS_ASSUME_PTR_ABI_SINGLE_END __ASSUME_PTR_ABI_SINGLE_END
|
|
345
|
+
#define OS_UNSAFE_INDEXABLE __unsafe_indexable
|
|
346
|
+
#define OS_HEADER_INDEXABLE __header_indexable
|
|
347
|
+
#define OS_COUNTED_BY(N) __counted_by(N)
|
|
348
|
+
#define OS_SIZED_BY(N) __sized_by(N)
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
#endif // __OS_BASE__
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#ifndef __OS_CLOCK__
|
|
2
|
+
#define __OS_CLOCK__
|
|
3
|
+
|
|
4
|
+
#include <os/base.h>
|
|
5
|
+
#include <stdint.h>
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* @typedef os_clockid_t
|
|
9
|
+
*
|
|
10
|
+
* @abstract
|
|
11
|
+
* Describes the kind of clock that the workgroup timestamp parameters are
|
|
12
|
+
* specified in
|
|
13
|
+
*/
|
|
14
|
+
OS_ENUM(os_clockid, uint32_t,
|
|
15
|
+
OS_CLOCK_MACH_ABSOLUTE_TIME = 32,
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
#endif /* __OS_CLOCK__ */
|