Permalink
Browse files

foreign-free, sbcl: add (optimize speed) declaration, which avoids

consing aliens.
  • Loading branch information...
1 parent 1b88e33 commit dab31377cc962cc3f5cd97037b9c65fb27c49c6d @stassats stassats committed with sionescu Nov 23, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/cffi-sbcl.lisp
View
3 src/cffi-sbcl.lisp
@@ -134,7 +134,8 @@
(declaim (inline foreign-free))
(defun foreign-free (ptr)
"Free a PTR allocated by FOREIGN-ALLOC."
- (declare (type system-area-pointer ptr))
+ (declare (type system-area-pointer ptr)
+ (optimize speed))
(free-alien (sap-alien ptr (* (unsigned 8)))))
(defmacro with-foreign-pointer ((var size &optional size-var) &body body)

0 comments on commit dab3137

Please sign in to comment.