Skip to content
Snippets Groups Projects
Commit 52686768 authored by Liam Healy's avatar Liam Healy
Browse files

Conditionalize with #+(and native sbcl)

Changed conditionals from #+sbcl to #+(and native sbcl) to allow for
the easy recompilation under SBCL as non-native by commenting out the
pushnew in init.lisp.
parent 4bfa337d
Branches
Tags
No related merge requests found
;; Use the foreign-friendly arrays package. ;; Use the foreign-friendly arrays package.
;; Liam Healy 2008-03-22 15:40:08EDT ;; Liam Healy 2008-03-22 15:40:08EDT
;; Time-stamp: <2008-12-27 17:54:24EST foreign-friendly.lisp> ;; Time-stamp: <2009-01-04 12:08:59EST foreign-friendly.lisp>
;; $Id$ ;; $Id$
;;; Foreign-friendly arrays (original implementation by Tamas Papp) ;;; Foreign-friendly arrays (original implementation by Tamas Papp)
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
;;;;**************************************************************************** ;;;;****************************************************************************
;;; To be called by a defmfun expander ;;; To be called by a defmfun expander
#+sbcl #+(and native sbcl)
(defun native-pointer-protect (array-symbols body) (defun native-pointer-protect (array-symbols body)
"Wrap the body with a form that obtains the native pointer "Wrap the body with a form that obtains the native pointer
and protects it during execution of the body." and protects it during execution of the body."
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
,(mapcar (lambda (s) `(original-array ,s)) array-symbols) ,(mapcar (lambda (s) `(original-array ,s)) array-symbols)
,body)) ,body))
#+sbcl #+(and native sbcl)
(defun c-pointer (marray) (defun c-pointer (marray)
"The pointer to the C array." "The pointer to the C array."
(cffi:inc-pointer (cffi:inc-pointer
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
(cffi:with-foreign-object (,pointer ,cffi-type ,length) (cffi:with-foreign-object (,pointer ,cffi-type ,length)
,@body))))) ,@body)))))
#+sbcl #+(and native sbcl)
(defmacro pin-to-pointer ((array pointer cffi-type length index-offset) (defmacro pin-to-pointer ((array pointer cffi-type length index-offset)
&body body) &body body)
(declare (ignorable length)) (declare (ignorable length))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment