diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2015-02-19 13:14:51 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2015-02-19 13:14:51 -0500 |
commit | 235c3cb105c3bac49e44296c8066cf7f1c585472 (patch) | |
tree | c7351e829fae0062404e4a37d37b7a79dc9cd5b9 /lisp/emacs-lisp | |
parent | a2f904981d10d68bd84b6c7233a79094f052fa8a (diff) | |
download | emacs-235c3cb105c3bac49e44296c8066cf7f1c585472.tar.gz emacs-235c3cb105c3bac49e44296c8066cf7f1c585472.tar.bz2 emacs-235c3cb105c3bac49e44296c8066cf7f1c585472.zip |
* lisp/emacs-lisp/cl-macs.el (cl-struct-slot-value): Handle a nil type.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index caaf7687dc8..c5f49b0ed91 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -2978,9 +2978,9 @@ STRUCT and SLOT-NAME are symbols. INST is a structure instance." ;; We could use `elt', but since the byte compiler will resolve the ;; branch below at compile time, it's more efficient to use the ;; type-specific accessor. - (if (eq (cl-struct-sequence-type ,struct-type) 'vector) - (aref ,inst (cl-struct-slot-offset ,struct-type ,slot-name)) - (nth (cl-struct-slot-offset ,struct-type ,slot-name) ,inst)))))) + (if (eq (cl-struct-sequence-type ,struct-type) 'list) + (nth (cl-struct-slot-offset ,struct-type ,slot-name) ,inst) + (aref ,inst (cl-struct-slot-offset ,struct-type ,slot-name))))))) (run-hooks 'cl-macs-load-hook) |