Просмотр исходного кода

changed upto-null back to func, since macro wasn't hygenic and I'm too lazy make it so

Mark VandenBrink 12 лет назад
Родитель
Сommit
21e1f0308f
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      utils.lisp

+ 3 - 2
utils.lisp

@@ -28,9 +28,10 @@
              (type (array (unsigned-byte 8) 1) array))
              (type (array (unsigned-byte 8) 1) array))
     (format nil "[~:d of ~:d bytes] <~x>" print-len len printable-array)))
     (format nil "[~:d of ~:d bytes] <~x>" print-len len printable-array)))
 
 
-(defmacro upto-null (string)
+(declaim (inline upto-null))
+(defun upto-null (string)
   "Trim STRING to end at first NULL found"
   "Trim STRING to end at first NULL found"
-  `(subseq ,string 0 (position #\Null ,string)))
+  (subseq string 0 (position #\Null string)))
 
 
 (defun dump-data (file-name data)
 (defun dump-data (file-name data)
   (with-open-file (f file-name :direction :output :if-exists :supersede :element-type '(unsigned-byte 8))
   (with-open-file (f file-name :direction :output :if-exists :supersede :element-type '(unsigned-byte 8))