|
From: | GNU bug Tracking System |
Subject: | [debbugs-tracker] bug#33731: closed (26.1; cl-make-random-state copying not working) |
Date: | Wed, 19 Dec 2018 22:29:02 +0000 |
Your message dated Wed, 19 Dec 2018 14:27:59 -0800 with message-id <address@hidden> and subject line Fwd: 26.1; cl-make-random-state copying not working has caused the debbugs.gnu.org bug report #33731, regarding 26.1; cl-make-random-state copying not working to be marked as done. (If you believe you have received this mail in error, please contact address@hidden) -- 33731: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33731 GNU Bug Tracking System Contact address@hidden with problems
--- Begin Message ---Subject: 26.1; cl-make-random-state copying not working Date: Fri, 14 Dec 2018 05:12:35 +0800 Hi, I am reading (info "(cl) Random Numbers") on cl-make-random-state. I expect the following returns two equal numbers, because s should be a copy of cl--random-state thus two cl-random should use two equal state. (let ((s (cl-make-random-state))) (list (cl-random 10000) (cl-random 10000 s))) ;; => (6955 916) If I didn't misunderstand this, I think it is because cl-make-random-state uses copy-tree, however it doesn't work for cl-structure at least in Emacs 26.1, it doesn't copy at all. (eq (cl-make-random-state 123) (cl-make-random-state 123)) ;; => nil (let* ((s1 (cl-make-random-state 123)) (s2 (cl-make-random-state s1))) (eq s1 s2)) ;; => t
--- End Message ---
--- Begin Message ---Subject: Fwd: 26.1; cl-make-random-state copying not working Date: Wed, 19 Dec 2018 14:27:59 -0800 Thanks for reporting this bug; it is a regression introduced when we separated records from vectors. I installed the attached patch into the emacs-26 branch. User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 0001-cl-make-random-state-was-not-copying-its-arg.patch
Description: Text Data
--- End Message ---
[Prev in Thread] | Current Thread | [Next in Thread] |