---
name: "rbhash_entry_setkey"
section: "3"
platform: "linux"
package: "libroy-dev"
version: "1.0.8-1"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/rbhash_entry_getkey"
---

# rbhash\_entry\_setkey(3)

get/set key in an RBHash entry.

Part of [rbhash\_entry\_getkey(3)](/rbhash_entry_getkey/3.md).

## NAME

rbhash\_entry\_getkey, rhash\_entry\_setkey - get/set key in an RBHash entry.

## SYNOPSIS

\#include \<roy.h\>

void \* rbhash\_entry\_getkey (void \*entry); void rbhash\_entry\_setkey (void \*entry);

## DESCRIPTION

These functions retrieve or set the key for a hash entry.  The key is stored in the hash entry so that it may be compared when inserted, looked up etc.  *entry* must have the *RHASH\_HEADER* as its first member.

Note that it is not necessary to use [*rbhash\_entry\_setkey*(3)](/rbhash_entry_setkey/3.md) to set the key prior to insertion into the hash table.  [*rbhash\_insert*(3)](/rbhash_insert/3.md) takes the key as an argument and sets it within the insert function.

## SEE ALSO

[*rbhash*(3)](/rbhash/3.md), [*rbhash\_entry\_setkey*(3)](/rbhash_entry_setkey/3.md),  [*rbhash\_free*(3)](/rbhash_free/3.md), [*rbhash\_insert*(3)](/rbhash_insert/3.md),  [*rbhash\_len*(3)](/rbhash_len/3.md), [*rbhash\_lookup*(3)](/rbhash_lookup/3.md),  [*rbhash\_lookup\_next*(3)](/rbhash_lookup_next/3.md), [*rbhash\_new*(3)](/rbhash_new/3.md),  [*rbhash\_remove*(3)](/rbhash_remove/3.md), [*rbhash\_remove\_entry*(3)](/rbhash_remove_entry/3.md),  [*roy*(3)](/roy/3.md)
