fix: sync-music: with-cue with :string type

This commit is contained in:
eriedaberrie 2024-12-19 15:51:00 -08:00
parent f9b32f8fc7
commit fb8d4127e4

View file

@ -33,14 +33,14 @@ Only works on Unix systems with a /dev/fd/ filesystem."
If TYPE is :FILE, use cue_parse_file with fopen on DATA. If TYPE is :STRING, If TYPE is :FILE, use cue_parse_file with fopen on DATA. If TYPE is :STRING,
use cue_parse_string directly." use cue_parse_string directly."
(once-only (data) (once-only (data)
`(let ((,var ,(ecase type `(let ((,var (with-ignore-stderr
(:file ,(ecase type
(with-gensyms (file) (:file
`(with-read-file (,file ,data) (with-gensyms (file)
(with-ignore-stderr `(with-read-file (,file ,data)
(cue-parse-file ,file))))) (cue-parse-file ,file))))
(:string (:string
data)))) `(cue-parse-string ,data))))))
(declare (dynamic-extent ,var)) (declare (dynamic-extent ,var))
(unless (cffi:null-pointer-p ,var) (unless (cffi:null-pointer-p ,var)
(unwind-protect (unwind-protect