rbhash_insert   (3) manpage
rbhash_insert
3
2003-10-23
Roy 1.0.7
Roy API Docs
  • NAME
      rbhash_insert - insert a new entry into an rbhash
  • SYNOPSIS
      #include <roy.h>

      void rbhash_insert (RBHash *hash, void *entry, RBuf *key);
  • DESCRIPTION
      Inserts a new entry into a hash table.  The entry structure is defined by the user, and should contain the macro 'RBHASH_HEADER'.  See rbhash(3) for information on how to create a compatible RBHashEntry structure.

      This function sets key as the key for entry; the equivalent of calling rbhash_entry_setkey(3) .  The key is stored using an RBuf * pointer within the RBHASH_HEADER; no copy of the RBuf itself is made.
  • RETURN VALUE
      This function doesn't reutrn a value.
  • DUPLICATE ENTRIES
      If an entry is inserted into the hash table with a key of an entry that already exists in the hash table, they will both be added and no error condition will exist.  Any calls thereafter to rbhash_lookup(3) will return the first entry inserted with that key.

      If you do not wish to have multiple entries with the same key, you must do a rbhash_lookup(3) prior to inserting the new entry.
  • SEE ALSO
Current Users: 27 © 1999-2006 Linux.com.hk PenguinSoft
All trademarks and copyrights on this page are owned by their respective companies. Linux is a trademark of Linus Torvalds.