From: Andrea Corallo Date: Tue, 29 Dec 2020 10:39:04 +0000 (+0100) Subject: * lisp/emacs-lisp/comp-cstr.el (comp-cstr): Better `comp-type-to-cstr'. X-Git-Tag: emacs-28.0.90~2727^2~200 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ba41a183dd5123130a0393b84658ec3f2fdd66f4;p=emacs.git * lisp/emacs-lisp/comp-cstr.el (comp-cstr): Better `comp-type-to-cstr'. --- diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el index 57d93912d2f..8a8e22e030d 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))