OBJ_bsearch_ex_

Binary-search a sorted object table with optional flags (internal helper).

Synopsis

Declared in <openssl/objects.h>

void const*
OBJ_bsearch_ex_(
    void const* key,
    void const* base,
    int num,
    int size,
    int(* cmp)(void const*, void const*),
    int flags);

Return Value

Pointer to the matching element, or NULL / a related pointer depending on flags.

Parameters

NameDescription
keyPointer to the search key.
basePointer to the first element of the sorted array.
numNumber of elements in the array.
sizeSize of each element in bytes.
cmpComparison function returning negative, zero, or positive.
flagsSearch flags such as OBJ_BSEARCH_VALUE_ON_NOMATCH.