0.pre7.58:
[sbcl.git] / src / code / target-misc.lisp
index 00615ac..9cb38b6 100644 (file)
 (defun function-doc (x)
   (let ((name
         (case (get-type x)
-          (#.sb!vm:closure-header-type
-           (%function-name (%closure-function x)))
-          ((#.sb!vm:function-header-type #.sb!vm:closure-function-header-type)
-           (%function-name x))
-          (#.sb!vm:funcallable-instance-header-type
-           (%function-name
-            (funcallable-instance-function x))))))
+          (#.sb!vm:closure-header-widetag
+           (%simple-fun-name (%closure-fun x)))
+          ((#.sb!vm:simple-fun-header-widetag
+            #.sb!vm:closure-fun-header-widetag)
+           (%simple-fun-name x))
+          (#.sb!vm:funcallable-instance-header-widetag
+           (%simple-fun-name
+            (funcallable-instance-fun x))))))
     (when (and name (typep name '(or symbol cons)))
       (values (info :function :documentation name)))))