From c45d4aca3a4c7b3a01580a3cfb1bc4d9c80ee266 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 20 Aug 2008 09:01:35 +0000 Subject: [PATCH] Implement HASH-TABLE/TYPE. --- v7/src/runtime/hashtb.scm | 6 +++++- v7/src/runtime/runtime.pkg | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/v7/src/runtime/hashtb.scm b/v7/src/runtime/hashtb.scm index 06533393c..f1601c322 100644 --- a/v7/src/runtime/hashtb.scm +++ b/v7/src/runtime/hashtb.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: hashtb.scm,v 1.38 2008/01/30 20:02:31 cph Exp $ +$Id: hashtb.scm,v 1.39 2008/08/20 09:01:31 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -111,6 +111,10 @@ USA. (set! address-hash-tables (weak-cons table address-hash-tables))) table))) +(define (hash-table/type table) + (guarantee-hash-table table 'HASH-TABLE/TYPE) + (table-type table)) + (define (hash-table/key-hash table) (guarantee-hash-table table 'HASH-TABLE/KEY-HASH) (table-type-key-hash (table-type table))) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 57a538af9..d4e0125f2 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.657 2008/08/18 06:56:14 cph Exp $ +$Id: runtime.pkg,v 14.658 2008/08/20 09:01:35 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -1874,6 +1874,7 @@ USA. hash-table/rehash-threshold hash-table/remove! hash-table/size + hash-table/type hash-table? make-eq-hash-table make-equal-hash-table -- 2.25.1