mirror of
https://github.com/samsonjs/lake.git
synced 2026-03-25 08:55:49 +00:00
27 lines
428 B
C
27 lines
428 B
C
/**
|
|
* symtable.c
|
|
* Lake Scheme
|
|
*
|
|
* Copyright 2011 Sami Samhuri
|
|
* MIT License
|
|
*
|
|
*/
|
|
|
|
#include <glib.h>
|
|
#include "lake.h"
|
|
#include "symtable.h"
|
|
|
|
static guint _sym_hash(gconstpointer key)
|
|
{
|
|
return SYM_HASH(SYM(key));
|
|
}
|
|
|
|
static gboolean _sym_eq(gconstpointer a, gconstpointer b)
|
|
{
|
|
return BOOL_VAL(sym_eq(SYM(a), SYM(b)));
|
|
}
|
|
|
|
GHashTable *symtable_make(void)
|
|
{
|
|
return g_hash_table_new(_sym_hash, _sym_eq);
|
|
}
|