[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] feature/byte-switch 19cb398 4/5: * lisp/emacs-lisp/bytecom
From: |
Vibhav Pant |
Subject: |
[Emacs-diffs] feature/byte-switch 19cb398 4/5: * lisp/emacs-lisp/bytecomp.el:Use correct size for switch jump-table |
Date: |
Wed, 25 Jan 2017 19:33:42 +0000 (UTC) |
branch: feature/byte-switch
commit 19cb3985a3795539b51d70625904e95a6e581eef
Author: Vibhav Pant <address@hidden>
Commit: Vibhav Pant <address@hidden>
* lisp/emacs-lisp/bytecomp.el:Use correct size for switch jump-table
---
lisp/emacs-lisp/bytecomp.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index b608844..dff8bcf 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -4020,7 +4020,10 @@ that suppresses all warnings during execution of BODY."
(cases (cadr table-info))
jump-table test-obj body tag donetag default-tag default-case)
(when (and cases (not (= (length cases) 1)))
- (setq jump-table (make-hash-table :test test :size (length cases))
+ (setq jump-table (make-hash-table :test test
+ :size (if (assq 'default cases)
+ (1- (length cases))
+ (length cases)))
default-tag (byte-compile-make-tag)
donetag (byte-compile-make-tag))
(byte-compile-variable-ref var)