rbuf_hash(3)

rbuf_hash3

String hash functions optimized for rbufs

Usage

#include <roy.h>

unsigned long int rbuf_hash (RBuf *buf); unsigned long int rbuf_hash2 (RBuf *buf);

Overview

The rubf_hash(3) routine is a reimplementation of the x31 hash routine used by glib and other libraries.

The rbuf_hash2(3) routine is an optimized version of the rbuf_hash(3) code, which works for us. Programmers should only use this routine if rbuf_hash(3) isn't fast enough, which it should be for most things.

Return value

These function return a hash value created from hashing the contents of buf.

Errors

Calls to rbuf_hash(3) and rbuf_hash2(3) can never fail.

Macro

These calls are implemented using functions.

Releases

2 releases since Debian 3.0 (Woody); the text changed 1 time.

  1. 3.0
  2. 3.1

From libroy-dev 1.0.8-1 in Debian 3.1 (Sarge). Parsed by carta from the page's man source.