Parcourir la source

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

Mark VandenBrink il y a 12 ans
Parent
commit
21e1f0308f
1 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 3 2
      utils.lisp

+ 3 - 2
utils.lisp

@@ -28,9 +28,10 @@
              (type (array (unsigned-byte 8) 1) 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"
-  `(subseq ,string 0 (position #\Null ,string)))
+  (subseq string 0 (position #\Null string)))
 
 (defun dump-data (file-name data)
   (with-open-file (f file-name :direction :output :if-exists :supersede :element-type '(unsigned-byte 8))