From: Larry D'A. <la...@el...> - 2009-06-26 20:10:02
|
variable-information will return :alien for variables defined with sb-alien:define-alien-variable. Signed-off-by: Larry D'Anna <la...@el...> --- contrib/sb-cltl2/env.lisp | 5 ++++- contrib/sb-cltl2/tests.lisp | 5 +++++ 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/contrib/sb-cltl2/env.lisp b/contrib/sb-cltl2/env.lisp index d1305d2..ea60bdf 100644 --- a/contrib/sb-cltl2/env.lisp +++ b/contrib/sb-cltl2/env.lisp @@ -193,7 +193,7 @@ CARS of the alist include: (declaim (ftype (sfunction (symbol &optional (or null lexenv)) - (values (member nil :special :lexical :symbol-macro :constant :global) + (values (member nil :special :lexical :symbol-macro :constant :global :alien) boolean list)) variable-information)) @@ -224,6 +224,9 @@ binding: :GLOBAL NAME refers to a global variable. (SBCL specific extension.) + :ALIEN + NAME refers to an alien variable. (SBCL specific extension.) + The second value is true if NAME is bound locally. This is currently always NIL for special variables, although arguably it should be T when there is a lexically apparent binding for the special variable. diff --git a/contrib/sb-cltl2/tests.lisp b/contrib/sb-cltl2/tests.lisp index 6266644..e40b707 100644 --- a/contrib/sb-cltl2/tests.lisp +++ b/contrib/sb-cltl2/tests.lisp @@ -226,6 +226,11 @@ (var-info this-is-global-too) (:global nil ((always-bound . t)))) +(sb-alien:define-alien-variable "errno" sb-alien:int) +(deftest alien-variable + (var-info errno) + (:alien nil nil)) + ;;;; FUNCTION-INFORMATION (defmacro fun-info (var &environment env) -- 1.6.0.4 |