From 71cf239d31d6bdb205ec9e3a88600d225958db5b Mon Sep 17 00:00:00 2001 From: jgarcia Date: Sat, 6 Jan 2007 16:07:15 +0000 Subject: [PATCH] Declaration SI::C-EXPORT-FNAME allows specifying the C name of the function --- src/cmp/cmpenv.lsp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/cmp/cmpenv.lsp b/src/cmp/cmpenv.lsp index 71b3bc9f8..4fe206503 100644 --- a/src/cmp/cmpenv.lsp +++ b/src/cmp/cmpenv.lsp @@ -223,13 +223,19 @@ (do-declaration (rest decl) #'error)) (SI::C-EXPORT-FNAME (dolist (x (cdr decl)) - (if (symbolp x) - (multiple-value-bind (found fname) - (si::mangle-name x t) - (if found - (warn "The function ~s is already in the runtime." x) - (put-sysprop x 'Lfun fname))) - (error "Syntax error in proclamation ~s" decl)))) + (cond ((symbolp x) + (multiple-value-bind (found c-name) + (si::mangle-name x t) + (if found + (warn "The function ~s is already in the runtime. C-EXPORT-FNAME declaration ignored." x) + (put-sysprop x 'Lfun c-name)))) + ((consp x) + (destructuring-bind (c-name lisp-name) x + (if (si::mangle-name lisp-name) + (warn "The funciton ~s is already in the runtime. C-EXPORT-FNAME declaration ignored." lisp-name) + (put-sysprop lisp-name 'Lfun c-name)))) + (t + (error "Syntax error in proclamation ~s" decl))))) ((ARRAY ATOM BASE-CHAR BIGNUM BIT BIT-VECTOR CHARACTER COMPILED-FUNCTION COMPLEX CONS DOUBLE-FLOAT EXTENDED-CHAR FIXNUM FLOAT HASH-TABLE INTEGER KEYWORD LIST LONG-FLOAT NIL NULL NUMBER PACKAGE PATHNAME RANDOM-STATE RATIO RATIONAL