On this page:
_ apr-hash
_ apr-hash/ null
apr-hash?
make-apr-hash
apr-hash-copy
apr-hash-ref
apr-hash-set!
apr-hash->keys
apr-hash->values
apr-hash->alist
alist->apr-hash
Version: 4.2.1

1.4 Hashtables

_apr-hash : ctype?
_apr-hash/null : ctype?
C pointer type representing an APR hash table.

(apr-hash? obj)  any
  obj : any/c
Checks whether the given obj is an APR hash table.

(make-apr-hash)  apr-hash?
Creates a new APR hash table with a default hash function suitable for byte string keys. The hash table is allocated from the current memory pool or from a fresh pool if (current-pool) returns #f.

(apr-hash-copy hash)  apr-hash?
  hash : apr-hash?
Creates a copy of an APR hash table. The copy is allocated from the current memory pool or from a fresh pool if (current-pool) returns #f.

(apr-hash-ref hash key)  cpointer?
  hash : apr-hash?
  key : bytes?
(apr-hash-set! hash key values)  void?
  hash : apr-hash?
  key : bytes?
  values : cpointer?
(set! (apr-hash-ref hash key) value)
Gets or sets an association in an APR hash table.

(apr-hash->keys hash)  list?
  hash : apr-hash?
Extracts a list of all keys from the APR hash table hash. The keys are returned as binary strings.

(apr-hash->values hash)  list?
  hash : apr-hash?
Extracts a list of all values from the APR hash table hash. The values are returned as generic C pointers.

(apr-hash->alist hash)  list?
  hash : apr-hash?
Extracts a list of all key value pairs from the APR hash table hash. The keys are binary strings, the values generic C pointers.

(alist->apr-hash alist)  apr-hash?
  alist : list?
Converts a list of key value pairs into an APR hash table. The keys should be binary strings, the values can be arbitrary C pointers. The new hash table is allocated using make-apr-hash.