From aaa0d52dd1f16e4df27585f5866a93e1211100b9 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 5 Jul 2025 11:17:51 -0400 Subject: [PATCH] (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) --- lisp/emacs-lisp/eieio-core.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5