Macaulay2 Engine
Loading...
Searching...
No Matches
table.c File Reference
#include "table.h"
#include <limits.h>
#include <stddef.h>
#include <assert.h>
#include "interface/m2-mem.h"

Go to the source code of this file.

Classes

struct  T
 Classic separate-chaining hash table used by the engine's low-level C code paths. More...
struct  T::binding
 Singly linked-list node holding one (key, value) pair in a hash bucket chain. More...

Macros

#define NEW(p)
#define FREE(ptr)
#define T   Table_T

Functions

static int cmpatom (const void *x, const void *y)
static unsigned hashatom (const void *key)
TTable_new (int hint, int cmp(const void *x, const void *y), unsigned hash(const void *key))
void * Table_get (T *table, const void *key)
void * Table_put (T *table, const void *key, void *value)
int Table_length (T *table)
void Table_map (T *table, void apply(const void *key, void **value, void *cl), void *cl)
void * Table_remove (T *table, const void *key)
const void ** Table_toArray (T *table, void *end)
void Table_free (T **table)