1
0
Fork 0

- removed file descripto leak in '%mkstemp';

- specialized method sequence-empry-p for complex string.
This commit is contained in:
cage 2022-06-03 19:17:37 +02:00
parent 9ef6c0200d
commit f1f25a66ec
2 changed files with 5 additions and 2 deletions

View File

@ -366,9 +366,9 @@
home))) home)))
(defun %mkstemp (prefix suffix) (defun %mkstemp (prefix suffix)
(multiple-value-bind (x path) (multiple-value-bind (fd path)
(nix:mkstemps prefix suffix) (nix:mkstemps prefix suffix)
(declare (ignore x)) (nix:close fd)
path)) path))
(defparameter *temporary-files-created* ()) (defparameter *temporary-files-created* ())

View File

@ -388,6 +388,9 @@ latter has a length equals to `total-size'"))
(defgeneric apply-coloring (from to)) (defgeneric apply-coloring (from to))
(defmethod misc:sequence-empty-p ((object complex-string))
(misc:sequence-empty-p (complex-char-array object)))
(defmethod apply-coloring ((from complex-string) (to string)) (defmethod apply-coloring ((from complex-string) (to string))
(with-accessors ((complex-char-array-from complex-char-array)) from (with-accessors ((complex-char-array-from complex-char-array)) from
(if (misc:sequence-empty-p complex-char-array-from) (if (misc:sequence-empty-p complex-char-array-from)