[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp ba41a18 1/5: * lisp/emacs-lisp/comp-cstr.el (comp-cs
From: |
Andrea Corallo |
Subject: |
feature/native-comp ba41a18 1/5: * lisp/emacs-lisp/comp-cstr.el (comp-cstr): Better `comp-type-to-cstr'. |
Date: |
Tue, 29 Dec 2020 11:51:58 -0500 (EST) |
branch: feature/native-comp
commit ba41a183dd5123130a0393b84658ec3f2fdd66f4
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
* lisp/emacs-lisp/comp-cstr.el (comp-cstr): Better `comp-type-to-cstr'.
---
lisp/emacs-lisp/comp-cstr.el | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el
index 57d9391..8a8e22e 100644
--- a/lisp/emacs-lisp/comp-cstr.el
+++ b/lisp/emacs-lisp/comp-cstr.el
@@ -49,7 +49,16 @@
"Likewise like `cl--all-builtin-types' but with t as common supertype.")
(cl-defstruct (comp-cstr (:constructor comp-type-to-cstr
- (type &aux (typeset (list type))))
+ (type &aux
+ (null (eq type 'null))
+ (integer (eq type 'integer))
+ (typeset (if (or null integer)
+ nil
+ (list type)))
+ (valset (when null
+ '(nil)))
+ (range (when integer
+ '((- . +))))))
(:constructor comp-value-to-cstr
(value &aux
(valset (list value))