fixing source line checks in chibi-doc

This commit is contained in:
Alex Shinn 2012-07-09 20:23:16 +09:00
parent 150cfd0a8b
commit 446f8910f3

View file

@ -639,8 +639,12 @@ div#footer {padding-bottom: 50px}
(define (object-source x) (define (object-source x)
(cond ((opcode? x) #f) (cond ((opcode? x) #f)
((bytecode? x) (bytecode-source x)) ((bytecode? x)
((procedure? x) (bytecode-source (procedure-code x))) (let ((src (bytecode-source x)))
(if (and (vector? src) (positive? (vector-length src)))
(vector-ref src 0)
src)))
((procedure? x) (object-source (procedure-code x)))
((macro? x) (macro-source x)) ((macro? x) (macro-source x))
(else #f))) (else #f)))