]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/bindat.el (sint): Burp in dynbind (bug#69749)
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 15 Mar 2024 16:45:09 +0000 (12:45 -0400)
committerEshel Yaron <me@eshelyaron.com>
Mon, 18 Mar 2024 15:41:47 +0000 (16:41 +0100)
(cherry picked from commit 7231a89524f280c51278c3c74c6ae2215a307f0f)

lisp/emacs-lisp/bindat.el

index ef0ec688dbd14616ea171827e777a79241493328..42ba89ba2c19fdf956b8b237cfc7d41dc4fd5bce 100644 (file)
@@ -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)))