]> git.eshelyaron.com Git - emacs.git/commitdiff
Treat base64 string encode/decode as pure functions
authorMattias Engdegård <mattiase@acm.org>
Sun, 19 Dec 2021 11:38:17 +0000 (12:38 +0100)
committerMattias Engdegård <mattiase@acm.org>
Mon, 20 Dec 2021 15:26:02 +0000 (16:26 +0100)
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns, pure-fns):
Mark base64-decode-string, base64-encode-string and
base64url-encode-string as pure and side-effect-free.

lisp/emacs-lisp/byte-opt.el

index 2bdf1f55111aee309a3022e4fd1752b5c85eede6..66ac67a814479d3796c39c5eb9666e0b9a2ac966 100644 (file)
@@ -1464,6 +1464,7 @@ See Info node `(elisp) Integer Basics'."
 (let ((side-effect-free-fns
        '(% * + - / /= 1+ 1- < <= = > >= abs acos append aref ash asin atan
         assq
+         base64-decode-string base64-encode-string base64url-encode-string
          bool-vector-count-consecutive bool-vector-count-population
          bool-vector-subsetp
         boundp buffer-file-name buffer-local-variables buffer-modified-p
@@ -1620,6 +1621,7 @@ See Info node `(elisp) Integer Basics'."
          assq rassq rassoc
          plist-get lax-plist-get plist-member
          aref elt
+         base64-decode-string base64-encode-string base64url-encode-string
          bool-vector-subsetp
          bool-vector-count-population bool-vector-count-consecutive
          )))