.\" Man page generated from reStructuredText .\" by the Docutils 0.22.3 manpage writer. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "HASHKIT_CREATE" "3" "Mar 07, 2026" "1.1" "libmemcached-awesome" .SH NAME hashkit_create \- libhashkit Documentation .SH SYNOPSIS .INDENT 0.0 .TP .B #include Compile and link with \-lhashkit .UNINDENT .INDENT 0.0 .TP .B typedef struct hashkit_st hashkit_st .UNINDENT .INDENT 0.0 .TP .B hashkit_st *hashkit_create(hashkit_st *hash) .INDENT 7.0 .TP .B Parameters \fBhash\fP \-\- memory address of a \fBhashkit_st\fP struct; if a nullptr is passed, the struct will be dynamically allocated by libhashkit .TP .B Returns pointer to initialized \fBhashkit_st\fP structure .UNINDENT .UNINDENT .INDENT 0.0 .TP .B hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr) .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBdestination\fP \-\- memory address of a \fBhashkit_st\fP struct; if a nullptr is passed, the struct will be dynamically allocated by libhashkit .IP \(bu 2 \fBptr\fP \-\- pointer of the \fBhashkit_st\fP struct to copy .UNINDENT .TP .B Returns pointer to a \fBhashkit_st\fP structure (\fBdestination\fP, if not nullptr), initialized from \fBptr\fP .UNINDENT .UNINDENT .INDENT 0.0 .TP .B void hashkit_free(hashkit_st *hash) .INDENT 7.0 .TP .B Parameters \fBhash\fP \-\- pointer to an initialized \fBhashkit_st\fP struct .UNINDENT .UNINDENT .INDENT 0.0 .TP .B bool hashkit_is_allocated(const hashkit_st *hash) .INDENT 7.0 .TP .B Parameters \fBhash\fP \-\- pointer to an initialized \fBhashkit_st\fP struct .TP .B Returns bool, whether the \fBhash\fP struct was dynamically allocated .UNINDENT .UNINDENT .SH DESCRIPTION .sp The \fBhashkit_create()\fP function initializes a hashkit object for use. If you pass a nullptr argument for hash, then the memory for the object is allocated. If you specify a pre\-allocated piece of memory, that is initialized for use. .sp The \fBhashkit_clone()\fP function initializes a hashkit object much like \fBhashkit_create()\fP, but instead of using default settings it will use the settings of the ptr hashkit object. .sp The \fBhashkit_free()\fP frees any resources being consumed by the hashkit objects that were initialized with \fBhashkit_create()\fP or \fBhashkit_clone()\fP\&. .sp The \fBhashkit_is_allocated()\fP reports whether the memory was allocated for a hashkit object. .SH RETURN VALUE .sp \fBhashkit_create()\fP and \fBhashkit_clone()\fP will return nullptr on failure or pointer to \fBhashkit_st\fP on success. .sp \fBhashkit_is_allocated()\fP returns true if the memory for the hashkit object was allocated inside of \fBhashkit_create()\fP or \fBhashkit_clone()\fP, otherwise it is false and was user\-supplied memory. .SH SEE ALSO .sp \fBlibhashkit(3) \%\fP \fBhashkit_value(3) \%\fP \fBhashkit_function3) \%\fP .\" End of generated man page.