From 497cd7dee0ca67644d92eeefac277e89361d3053 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 10 Dec 2011 12:20:03 -0800 Subject: * eval.c (eval_init): New functions added as intrinsics. * hash.c (hash_eql, hash_equal): New external functions. * hash.h (hash_eql, hash_equal): Declared. * txr.1: Sections added. --- hash.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'hash.c') diff --git a/hash.c b/hash.c index 214d4e8f..892dfa5c 100644 --- a/hash.c +++ b/hash.c @@ -408,6 +408,16 @@ val maphash(val fun, val hash) return nil; } +val hash_eql(val obj) +{ + return num(eql_hash(obj) % NUM_MAX); +} + +val hash_equal(val obj) +{ + return num(equal_hash(obj) % NUM_MAX); +} + /* * Called from garbage collector. Hash module must process all weak tables * that were visited during the marking phase, maintained in the list -- cgit v1.2.3