Matthew Danish wrote:
>On Mon, Nov 08, 2004 at 10:59:10PM +0100, cees-bart wrote:
>
>
>>yes, but then i have to rename all occurrences in the code to
>>make-my-hash-table, because otherwise the same stack overflow pops up.
>>
>>
>
>No you don't; shadow-import the MAKE-HASH-TABLE function from your
>MY-HASH-TABLE package into your application package.
>
>(defpackage ...
> (:shadowing-import-from my-hash-table make-hash-table gethash ...)
> ...)
>
>
>
OK .. but .. I want to define my function make-hash-table in terms of
make-hash-table in the common-lisp package: in fact, i just want to
throw away the labeled argument :hash-function which is not supported in
cmucl (it's originally allegro code). so, this is my code:
(make-package :my-hash-utils)
(in-package :my-hash-utils)
(export 'make-hash-table)
(defun make-hash-table (&key (test 'eql) (hash-function 'eql-hash) (size
65) (rehash-size 1.5)
(rehash-threshold 1) (weak-p nil))
(common-lisp:make-hash-table :test test
:size size
:rehash-size rehash-size
:rehash-threshold rehash-treshhold
:weak-p weak-p))
now, in the code (a package called :pvs) i'm porting to cmu lisp i
shadow-import this make-hash-table function as follows:
(in-package :pvs)
(shadowing-import 'my-hash-utils:make-hash-table)
which results in the same stack overflow.