emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/record c519b21: Fixes for EIEIO.


From: Lars Brinkhoff
Subject: [Emacs-diffs] scratch/record c519b21: Fixes for EIEIO.
Date: Wed, 29 Mar 2017 04:19:50 -0400 (EDT)

branch: scratch/record
commit c519b2158751bf4c66ffd46128ddad44d974d98c
Author: Lars Brinkhoff <address@hidden>
Commit: Lars Brinkhoff <address@hidden>

    Fixes for EIEIO.
    
    - Remove extra slot due to counting the tag twice.
    - Adjust eieio-pcase-slot-index for new tagging.
---
 lisp/emacs-lisp/eieio-core.el | 3 ++-
 lisp/emacs-lisp/eieio.el      | 3 +--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el
index 2bc8c03..d757fa2 100644
--- a/lisp/emacs-lisp/eieio-core.el
+++ b/lisp/emacs-lisp/eieio-core.el
@@ -493,7 +493,8 @@ See `defclass' for more information."
     ;; Create the cached default object.
     (let ((cache (make-record newc
                               (+ (length (eieio--class-slots newc))
-                                 (eval-when-compile eieio--object-num-slots))
+                                 (eval-when-compile eieio--object-num-slots)
+                                 -1)
                               nil)))
       (let ((eieio-skip-typecheck t))
        ;; All type-checking has been done to our satisfaction
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index f3530ca..2822adf 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -337,8 +337,7 @@ variable name of the same name as the slot."
 ;; hard-coded in random .elc files.
 (defun eieio-pcase-slot-index-table (obj)
   "Return some data structure from which can be extracted the slot offset."
-  (eieio--class-index-table
-   (symbol-value (eieio--object-class-tag obj))))
+  (eieio--class-index-table (eieio--object-class obj)))
 
 (defun eieio-pcase-slot-index-from-index-table (index-table slot)
   "Find the index to pass to `aref' to access SLOT."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]