emacs/test/lisp/emacs-lisp/eieio-tests
Stefan Monnier d553e603f4 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.
2021-10-31 10:58:43 -04:00
..
eieio-test-methodinvoke.el ; Minor stylistic checkdoc fixes in test/**/*.el 2021-09-26 17:53:23 +02:00
eieio-test-persist.el ; Minor stylistic checkdoc fixes in test/**/*.el 2021-09-26 17:53:23 +02:00
eieio-tests.el eieio-core.el: Make slot-value work on defstructs 2021-10-31 10:58:43 -04:00