GNU bug report logs - #56255
28.1.50; sxhash-equal does not change when object is modified

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> gmail.com>

Date: Mon, 27 Jun 2022 12:27:02 UTC

Severity: normal

Found in version 28.1.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #43 received at 56255 <at> debbugs.gnu.org (full text, mbox):

From: Ihor Radchenko <yantar92 <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 56255 <at> debbugs.gnu.org
Subject: Re: bug#56255: 28.1.50; sxhash-equal does not change when object is
 modified
Date: Thu, 30 Jun 2022 19:16:49 +0800
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

>> (setq a (avl-tree--create #'org-element--cache-compare))
>> (avl-tree-enter a '(headline (:begin 2)))
>> (setq tbl (make-hash-table :test #'equal))
>> (puthash a 'value tbl)
>> (gethash a tbl)
>> (plist-put (nth 1 (avl-tree-first a)) :begin 10)
>> (gethash a tbl) ;; the value does not change!
>
> That has nothing to do with collisions -- you're free to alter a key as
> much as you want.  It's just a normal Lisp object.

You are indeed right. Thanks for the clarification!

Best,
Ihor




This bug report was last modified 3 years and 58 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.