From 36b1af61d148bfdd5c2a13061600ea79c015b52e Mon Sep 17 00:00:00 2001 From: jgarcia Date: Thu, 9 Aug 2007 20:50:46 +0000 Subject: [PATCH] DEF-CONSTANT was missing from our UFFI interface --- src/lsp/ffi.lsp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lsp/ffi.lsp b/src/lsp/ffi.lsp index 270f5ce22..48161217a 100644 --- a/src/lsp/ffi.lsp +++ b/src/lsp/ffi.lsp @@ -39,6 +39,13 @@ #-ecl-min (clines "#include ") +(defmacro def-constant (name value &key (export nil)) + "Macro to define a constant and to export it" + `(eval-when (:compile-toplevel :load-toplevel :execute) + (defconstant ,name ,value) + ,(when export (list 'export `(quote ,name))) + ',name)) + ;;;---------------------------------------------------------------------- ;;; FOREIGN TYPES ;;;