From: Stefan Monnier Date: Sat, 5 Jul 2025 15:17:51 +0000 (-0400) Subject: (eieio--validate-slot-value): Don't break on struct objects X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=aaa0d52dd1f16e4df27585f5866a93e1211100b9;p=emacs.git (eieio--validate-slot-value): Don't break on struct objects Nowadays `eieio-oset` applies to more than just EIEIO objects. The old code tended to work OK but only because `eieio--class-slots` is usually compiled/inlined without checks. * lisp/emacs-lisp/eieio-core.el (eieio--validate-slot-value): Don't assume CLASS is an EIEIO class. (cherry picked from commit 4024a7d541ca049ca9b28bce54c225bf9691f944) --- diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el index 72640e88301..0beca666c48 100644 --- a/lisp/emacs-lisp/eieio-core.el +++ b/lisp/emacs-lisp/eieio-core.el @@ -681,7 +681,7 @@ an error." nil ;; Trim off object IDX junk added in for the object index. (setq slot-idx (- slot-idx (eval-when-compile eieio--object-num-slots))) - (let* ((sd (aref (eieio--class-slots class) + (let* ((sd (aref (cl--class-slots class) ;?? slot-idx)) (st (cl--slot-descriptor-type sd))) (cond