diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index f299b1c8..0dac6b2b 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: os: [macos-15] - xcode-version: [16.0] # Swift 6.0 + xcode-version: ["16.0"] # Swift 6.0 runs-on: ${{ matrix.os }} env: OPENGRAPH_WERROR: 1 diff --git a/Package.resolved b/Package.resolved index 8ccf8439..b6ea544c 100644 --- a/Package.resolved +++ b/Package.resolved @@ -7,7 +7,7 @@ "location" : "https://github.com/OpenSwiftUIProject/DarwinPrivateFrameworks.git", "state" : { "branch" : "main", - "revision" : "e12014b79f31a1483d7633f188c520fdf40f79c1" + "revision" : "d115c29b7468940969b0c2f5cb0d612a28563a02" } }, { diff --git a/Sources/OpenGraph/Attribute/Attribute/AnyAttribute.swift b/Sources/OpenGraph/Attribute/Attribute/AnyAttribute.swift index cba4296b..a9eaef40 100644 --- a/Sources/OpenGraph/Attribute/Attribute/AnyAttribute.swift +++ b/Sources/OpenGraph/Attribute/Attribute/AnyAttribute.swift @@ -62,7 +62,7 @@ extension AnyAttribute { public var _bodyPointer: UnsafeRawPointer { info.body } - + public var valueType: Any.Type { info.type.pointee.valueTypeID.type } @@ -97,3 +97,10 @@ extension AnyAttribute { body: (UnsafeMutableRawPointer) -> Void ) } + +extension [AnyAttribute] { + @_transparent + public var anyInputsChanged: Bool { + __OGGraphAnyInputsChanged(self, count) + } +} diff --git a/Sources/OpenGraph_SPI/Graph/OGGraph.cpp b/Sources/OpenGraph_SPI/Graph/OGGraph.cpp index c16789d7..3e283367 100644 --- a/Sources/OpenGraph_SPI/Graph/OGGraph.cpp +++ b/Sources/OpenGraph_SPI/Graph/OGGraph.cpp @@ -207,3 +207,8 @@ void OGGraphSetNeedsUpdate(OGGraphRef graph) { } // graph->context->set_needs_update(); } + +bool OGGraphAnyInputsChanged(const OGAttribute *inputs, size_t count) { + // TODO + return false; +} diff --git a/Sources/OpenGraph_SPI/include/OGBase.h b/Sources/OpenGraph_SPI/include/OGBase.h index b44fe9a5..65c157b3 100644 --- a/Sources/OpenGraph_SPI/include/OGBase.h +++ b/Sources/OpenGraph_SPI/include/OGBase.h @@ -43,6 +43,16 @@ #define OG_CONSTEXPR #endif +#if !defined(__counted_by) +#if __has_attribute(__counted_by__) +#define __counted_by(N) __attribute__((__counted_by__(N))) +#else +#define __counted_by(N) +#endif +#endif + +#define OG_COUNTED_BY(N) __counted_by(N) + #include "OGSwiftSupport.h" #include "OGTargetConditionals.h" #include diff --git a/Sources/OpenGraph_SPI/include/OGGraph.h b/Sources/OpenGraph_SPI/include/OGGraph.h index 37154bfa..b8f2a029 100644 --- a/Sources/OpenGraph_SPI/include/OGGraph.h +++ b/Sources/OpenGraph_SPI/include/OGGraph.h @@ -103,6 +103,10 @@ OG_EXPORT OG_REFINED_FOR_SWIFT void OGGraphSetNeedsUpdate(OGGraphRef graph) OG_SWIFT_NAME(OGGraphRef.setNeedsUpdate(self:)); +OG_EXPORT +OG_REFINED_FOR_SWIFT +bool OGGraphAnyInputsChanged(const OGAttribute *inputs OG_COUNTED_BY(count), size_t count); + OG_EXTERN_C_END OG_ASSUME_NONNULL_END