44
55#if OPENATTRIBUTEGRAPH_DANCEUIGRAPH
66
7+ // FIXME: Runtime crash to be fixed in OpenSwiftUI
8+
79@_exported public import DanceUIRuntime
810@_exported public import DanceUIGraph
9- @_exported public import Foundation
10- import Darwin
1111
1212public typealias AttributeBodyVisitor = DanceUIGraph . AttributeBodyVisitor
1313public typealias ComparisonMode = DGComparisonMode
@@ -220,9 +220,8 @@ private func OAGDGSubgraphIntersects(_ subgraph: DGSubgraphRef, _ flags: DGAttri
220220
221221// MARK: - Graph
222222
223- @frozen
224- public struct Graph: Hashable {
225- public var base: DGGraphRef
223+ public final class Graph: Hashable {
224+ let base: DGGraphRef
226225
227226 public init() {
228227 base = DGGraphCreate()
@@ -232,7 +231,7 @@ public struct Graph: Hashable {
232231 base = DGGraphCreateShared(graph.base)
233232 }
234233
235- public init(_ base: DGGraphRef) {
234+ init(_ base: DGGraphRef) {
236235 self.base = base
237236 }
238237
@@ -260,7 +259,7 @@ public struct Graph: Hashable {
260259
261260 public var context: UnsafeRawPointer? {
262261 get { OAGDGGraphGetContext(base).map(UnsafeRawPointer.init) }
263- nonmutating set { OAGDGGraphSetContext(base, newValue.map(UnsafeMutableRawPointer.init(mutating:))) }
262+ set { OAGDGGraphSetContext(base, newValue.map(UnsafeMutableRawPointer.init(mutating:))) }
264263 }
265264
266265 public static func typeIndex(
@@ -436,11 +435,11 @@ public struct Graph: Hashable {
436435}
437436
438437public func === ( lhs: Graph , rhs: Graph ) -> Bool {
439- lhs == rhs
438+ lhs. base === rhs. base
440439}
441440
442441public func !== ( lhs: Graph , rhs: Graph ) -> Bool {
443- ! ( lhs == rhs)
442+ lhs. base ! == rhs. base
444443}
445444
446445extension Graph . CounterQueryType {
0 commit comments