1. Walton Hoops
  2. cl-taglib

Commits

Walton Hoops  committed a7bb7a6

Basic with-open-file framework

BUG: Returns no value

  • Participants
  • Parent commits 9debea0
  • Branches master

Comments (0)

Files changed (1)

File cl-taglib.lisp

View file
 (defcfun (file-save "taglib_file_save") :boolean
   (file :pointer))
 
+(defmacro with-tag-file ((var path) &body body)
+  `(let ((,var (file-new ,path)))
+     ,@body
+     (file-free ,var)))
+
 (defmacro taglib-accessor-for (slot type)
   (let ((function-name (intern (concatenate 'string "TAG-" (string slot))))
 	(foreign-name (string-downcase (concatenate 'string "taglib_tag_" (string slot))))