unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#27057: 26.0.50; Equal defstruct objects not recognized in puthash
@ 2017-05-24 15:39 Stefan Monnier
  2017-05-24 15:56 ` bug#26639: " Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2017-05-24 15:39 UTC (permalink / raw)
  To: 27057

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#26639: bug#27057: 26.0.50; Equal defstruct objects not recognized in puthash
  2017-05-24 15:39 bug#27057: 26.0.50; Equal defstruct objects not recognized in puthash Stefan Monnier
@ 2017-05-24 15:56 ` Stefan Monnier
  2017-05-24 16:02   ` Michael Albinus
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2017-05-24 15:56 UTC (permalink / raw)
  To: 27057-done, 26639-done; +Cc: Lars Brinkhoff, Michael Albinus

>     (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.

This should be fixed now,


        Stefan





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#26639: bug#27057: 26.0.50; Equal defstruct objects not recognized in puthash
  2017-05-24 15:56 ` bug#26639: " Stefan Monnier
@ 2017-05-24 16:02   ` Michael Albinus
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Albinus @ 2017-05-24 16:02 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Lars Brinkhoff, 27057-done, 26639-done

Stefan Monnier <monnier@iro.umontreal.ca> writes:

Hi Stefan

>> this code return 2 here instead of 1.
>
> This should be fixed now,

Thanks. But for Tramp, I'll keep the list type, due to backward compatibility.

>         Stefan

Best regards, Michael.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-24 16:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-24 15:39 bug#27057: 26.0.50; Equal defstruct objects not recognized in puthash Stefan Monnier
2017-05-24 15:56 ` bug#26639: " Stefan Monnier
2017-05-24 16:02   ` Michael Albinus

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).