Clean up with `:allow-other-keys` on the caller side
author |
Steve Losh <steve@stevelosh.com> |
date |
Mon, 02 Jan 2017 16:38:13 +0000 |
parents |
a8e88620b62c
|
children |
b7b83364b2ea
|
branches/tags |
(none) |
files |
src/directed-graph.lisp |
Changes
--- a/src/directed-graph.lisp Mon Nov 21 14:32:49 2016 +0000
+++ b/src/directed-graph.lisp Mon Jan 02 16:38:13 2017 +0000
@@ -2,15 +2,12 @@
;;;; Utils --------------------------------------------------------------------
(defun make-hash-table-portably (&key (size 0) test hash-function)
- ;; Only try to pass :hash-function if we were given it, so we don't explode in
- ;; implementations that don't support it.
- ;;
- ;; Also, use `apply` instead of a simple `if` because we don't want spurious
- ;; compiler warnings... This is ugly.
- (apply #'make-hash-table :test test :size size
- (if hash-function
- (list :hash-function hash-function)
- '())))
+ (make-hash-table
+ :test test
+ :size size
+ ;; Don't explode if the implementation doesn't support :hash-function.
+ :allow-other-keys t
+ :hash-function hash-function))
;;;; Data ---------------------------------------------------------------------