From: Javier O. <pi...@gm...> - 2014-08-07 22:21:35
|
Hi, This patch fixes the errorp option of find-defstruct-description. I don't know if &aux is aligned SBCL coding standards or if this is the proper channel to submit it. Hope it helps. Javier Olaechea >From 3e1ec177fc873c60347106d4bd5b70b6d784e574 Mon Sep 17 00:00:00 2001 From: PuercoPop <pi...@gm...> Date: Thu, 7 Aug 2014 16:53:42 -0500 Subject: [PATCH] fix find-defstruct-description's errorp flag --- src/code/defstruct.lisp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/code/defstruct.lisp b/src/code/defstruct.lisp index a406a8b..6e4bd39 100644 --- a/src/code/defstruct.lisp +++ b/src/code/defstruct.lisp @@ -1901,10 +1901,10 @@ (%compiler-defstruct dd inherits))) ;;; finding these beasts -(defun find-defstruct-description (name &optional (errorp t)) - ;; FIXME: errorp=nil doesn't actually work. - ;; FIND-CLASSOID returns NIL, and the rest is obvious. - (let ((info (layout-info (classoid-layout (find-classoid name errorp))))) +(defun find-defstruct-description (name &optional (errorp t) &aux (classoid (find-classoid name errorp))) + (let ((info (if classoid + (layout-info (classoid-layout classoid)) + nil))) (if (defstruct-description-p info) info (when errorp -- 1.9.1 -- "I object to doing things that computers can do." — Olin Shivers |