cees-bart <[EMAIL PROTECTED]> writes:

> (make-package :my-hash-utils)

MY-HASH-UTILS will use the COMMON-LISP -package by default.

> (in-package :my-hash-utils)
> (export 'make-hash-table)

This refers to COMMON-LISP: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))

This redefines COMMON-LISP:MAKE-HASH-TABLE...

>   (common-lisp:make-hash-table :test test

... so no doubt you get recursion.  To fix this, shadow
make-hash-table in the my-hash-utils package too:

  (defpackage "MY-HASH-UTILS"
    (:use "COMMON-LISP")
    (:shadow "MAKE-HASH-TABLE"))

Earlier, you wrote:

> I know that redefining is very dangerous, but note that even if I 
> 'redefine' make-hash-table with the _same_ sourcecode, the stackoverflow 
> occurs. Any clues?

Perhaps the interpreter uses MAKE-HASH-TABLE.  It seems to work
if I compile it with (compile 'make-hash-table #'(lambda ...)) or
with compile-file.


-- Attached file included as plaintext by Listar --

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQBBkRuEHm9IGt60eMgRAt4LAKC1aEDvtPaxk4tN7IUyp+8Rl5yCGQCfZxpk
EZtBkwLJ5mMdDK93qcJfcZ4=
=If5z
-----END PGP SIGNATURE-----


Reply via email to