From: Mark Wooding Date: Wed, 16 Dec 2015 03:17:49 +0000 (+0000) Subject: src/c-types-parse.lisp: Cope if `*module-type-map*' is unbound. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/commitdiff_plain/ec5cb3ca19e5ff70869dbe77ac3fcc008bc33e0f?ds=inline src/c-types-parse.lisp: Cope if `*module-type-map*' is unbound. This is useful for testing parsing outside of the context of a module file. --- diff --git a/src/c-types-parse.lisp b/src/c-types-parse.lisp index 53fc811..15d942a 100644 --- a/src/c-types-parse.lisp +++ b/src/c-types-parse.lisp @@ -240,7 +240,8 @@ (defun scan-declspec ;; Turns out to be easier to do this by hand. (let ((ds (and (eq (token-type scanner) :id) (let ((kw (token-value scanner))) - (or (gethash kw *module-type-map*) + (or (and (boundp '*module-type-map*) + (gethash kw *module-type-map*)) (gethash kw *declspec-map*)))))) (cond ((or (not ds) (and predicate (not (funcall predicate ds)))) (values (list indicator) nil nil))