emacs-diffs
[Top][All Lists]
Advanced

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

master 7231a89524f: * lisp/emacs-lisp/bindat.el (sint): Burp in dynbind


From: Stefan Monnier
Subject: master 7231a89524f: * lisp/emacs-lisp/bindat.el (sint): Burp in dynbind (bug#69749)
Date: Fri, 15 Mar 2024 12:45:20 -0400 (EDT)

branch: master
commit 7231a89524f280c51278c3c74c6ae2215a307f0f
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * lisp/emacs-lisp/bindat.el (sint): Burp in dynbind (bug#69749)
---
 lisp/emacs-lisp/bindat.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el
index ef0ec688dbd..42ba89ba2c1 100644
--- a/lisp/emacs-lisp/bindat.el
+++ b/lisp/emacs-lisp/bindat.el
@@ -944,9 +944,13 @@ a bindat type expression."
 (bindat-defmacro sint (bitlen le)
   "Signed integer of size BITLEN.
 Big-endian if LE is nil and little-endian if not."
+  (unless lexical-binding
+    (error "The `sint' type requires 'lexical-binding'"))
   (let ((bl (make-symbol "bitlen"))
         (max (make-symbol "max"))
         (wrap (make-symbol "wrap")))
+    ;; FIXME: This `let*' around the `struct' results in code which the
+    ;; byte-compiler does not handle efficiently. 🙁
     `(let* ((,bl ,bitlen)
             (,max (ash 1 (1- ,bl)))
             (,wrap (+ ,max ,max)))



reply via email to

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