diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-10-31 10:57:44 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-10-31 10:58:43 -0400 |
commit | d553e603f405acb06ad9ea233543ebe6ce319210 (patch) | |
tree | 679f835c197742e32b222ea59af69d55b20673cb /lisp/emacs-lisp/cl-print.el | |
parent | c062c9d4db0ed5d9a1bc45696ae660234d37d1cf (diff) | |
download | emacs-d553e603f405acb06ad9ea233543ebe6ce319210.tar.gz emacs-d553e603f405acb06ad9ea233543ebe6ce319210.tar.bz2 emacs-d553e603f405acb06ad9ea233543ebe6ce319210.zip |
eieio-core.el: Make slot-value work on defstructs
Adjust the values in EIEIO's index-tables so they are compatible with those
of defstructs.
* lisp/emacs-lisp/eieio-core.el (eieio--slot-name-index): Don't add the
`eieio--object-num-slots` offset.
(eieio-defclass-internal): Add the `eieio--object-num-slots` offset
here instead.
(eieio-oref): Allow its use on `cl-structure-object`.
* lisp/emacs-lisp/eieio.el (eieio-pcase-slot-index-from-index-table):
Don't need to add the `eieio--object-num-slots` offset.
* doc/misc/eieio.texi (Accessing Slots, Accessing Slots):
Mention the use on structs.
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-defstruct-slot-value): New test.
Diffstat (limited to 'lisp/emacs-lisp/cl-print.el')
0 files changed, 0 insertions, 0 deletions