Binary-search a sorted array of fixed-size elements using a comparator.
Declared in <openssl/objects.h>
void const*
OBJ_bsearch_(
void const* key,
void const* base,
int num,
int size,
int(* cmp)(void const*, void const*));
Used internally by the OBJ_bsearch_* helpers; prefer those type-safe wrappers.
Pointer to the matching element, or NULL if not found.
| Name | Description |
|---|---|
| key | Pointer to the search key passed as the first argument to cmp. |
| base | Base address of the sorted array. |
| num | Number of elements in the array. |
| size | Size of each element in bytes. |
| cmp | Comparison callback returning negative, zero, or positive like strcmp. |