<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFBagEqualCallBack",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@T@CFBagEqualCallBack"
  },
  "title" : "CFBagEqualCallBack"
}
-->

# CFBagEqualCallBack

Prototype of a callback function used to determine if two values in a bag are equal.

```
typealias CFBagEqualCallBack = (UnsafeRawPointer?, UnsafeRawPointer?) -> DarwinBoolean
```

## Parameters

`value1`

A value in the bag.

`value2`

Another value in the bag.

## Return Value

`true` if `value1` and `value2` are equal, `false` otherwise.

## Discussion

This callback is passed to [`CFBagCreate(_:_:_:_:)`](/documentation/CoreFoundation/CFBagCreate(_:_:_:_:)) in a [`CFBagCallBacks`](/documentation/CoreFoundation/CFBagCallBacks) structure.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)