unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: 27057@debbugs.gnu.org
Subject: bug#27057: 26.0.50; Equal defstruct objects not recognized in puthash
Date: Wed, 24 May 2017 11:39:56 -0400	[thread overview]
Message-ID: <jwvvaoqtgab.fsf@pastel> (raw)

Package: Emacs
Version: 26.0.50

It looks like the new records-based code introduced a bug in the way
records are handled as keys in hash-tables when the test is `equal`:

    (progn
      (cl-defstruct sm-foo a b)
      (setq sm-hash (make-hash-table :test 'equal))
      (puthash (make-sm-foo :a 4 :b 6) "test1" sm-hash)
      (puthash (make-sm-foo :a 4 :b 6) "test2" sm-hash)
      (hash-table-count sm-hash))

this code return 2 here instead of 1.  Lars, could you take a look at it?


        Stefan





             reply	other threads:[~2017-05-24 15:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-24 15:39 Stefan Monnier [this message]
2017-05-24 15:56 ` bug#26639: bug#27057: 26.0.50; Equal defstruct objects not recognized in puthash Stefan Monnier
2017-05-24 16:02   ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvvaoqtgab.fsf@pastel \
    --to=monnier@iro.umontreal.ca \
    --cc=27057@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).