[#OBJ_NAME_new_index]
= OBJ&lowbar;NAME&lowbar;new&lowbar;index
:mrdocs:

Allocate a new OBJ&lowbar;NAME type index with custom hash, compare, and free callbacks&period;

== Synopsis

Declared in `&lt;openssl&sol;objects&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
OBJ&lowbar;NAME&lowbar;new&lowbar;index(
    unsigned long(* hash&lowbar;func)(char const*),
    int(* cmp&lowbar;func)(char const*, char const*),
    void(* free&lowbar;func)(char const*, int, char const*));
----

== Return Value

New positive type index on success, or 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *hash&lowbar;func*
| Hash function for names of this type, or NULL for the default&period;
| *cmp&lowbar;func*
| Comparison function for names of this type, or NULL for the default&period;
| *free&lowbar;func*
| Optional freer invoked as free&lowbar;func(name, type, data) when an entry is removed, or NULL&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
