
Raymond Toy pushed to branch issue-375-mkstemp-return-filename at cmucl / cmucl Commits: 239afca7 by Raymond Toy at 2025-02-16T19:16:57-08:00 Fix typo in mkstemp.name-returned We were trying to unlink `name`, but it should be `filename`. - - - - - 93ec7d20 by Raymond Toy at 2025-02-16T19:17:55-08:00 Forgot one place to use system-area-copy and fix typo in another call. Replace one loop with system-area-copy in unix-mkstemp. Fix typo in system-area-copy in unix-mkdtemp because we forgot the dst offset arg. - - - - - 2 changed files: - src/code/unix.lisp - tests/unix.lisp Changes: ===================================== src/code/unix.lisp ===================================== @@ -2932,8 +2932,10 @@ (progn ;; Copy out the alien bytes and convert back ;; to a lisp string. - (dotimes (k length) - (setf (aref octets k) (deref buffer k))) + (system:without-gcing + (kernel:system-area-copy (alien-sap buffer) 0 + (vector-sap octets) 0 + (* length vm:byte-bits))) (stream:octets-to-string octets :external-format format))) (cast buffer (* c-call:char)))))) @@ -2959,7 +2961,7 @@ ;; Copy the octets from OCTETS to the null-terminated array BUFFER. (system:without-gcing (kernel:system-area-copy (vector-sap octets) 0 - (alien-sap buffer) + (alien-sap buffer) 0 (* length vm:byte-bits))) (setf (deref buffer length) 0) ===================================== tests/unix.lisp ===================================== @@ -18,7 +18,7 @@ (assert-false (equalp filename template)) (assert-true (>= 5 (mismatch filename template)))))) (when fd - (unix:unix-unlink name))))) + (unix:unix-unlink filename))))) (define-test mkstemp.non-ascii-name-returned (:tag :issues) View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/5039239f52588ce07568439... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/5039239f52588ce07568439... You're receiving this email because of your account on gitlab.common-lisp.net.