From fe38ab30390e757a462f3ce13529a6a3ca5ce30f Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Fri, 14 May 2010 16:30:18 +0200 Subject: [PATCH] Macros for unsafe car/cdr access --- src/cmp/cmpopt-cons.lsp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cmp/cmpopt-cons.lsp b/src/cmp/cmpopt-cons.lsp index 7c392a39b..0ca2c2d2a 100644 --- a/src/cmp/cmpopt-cons.lsp +++ b/src/cmp/cmpopt-cons.lsp @@ -36,6 +36,13 @@ (expand-simple-optimizer (rest whole) args inline-form env) whole))))) +(defmacro cons-car (x) + `(ffi:c-inline (,x) (:object) :object "ECL_CONS_CAR(#0)" + :one-liner t :side-effects nil)) + +(defmacro cons-cdr (x) + `(ffi:c-inline (,x) (:object) :object "ECL_CONS_CDR(#0)" + :one-liner t :side-effects nil)) ;;; ;;; RPLACA / RPLACD ;;;