1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-19 19:20:23 +02:00

Fix errors when stripping annotations

* module/ice-9/annotate.scm (set-annotation-stripped!): Fix prototype to
  correspond to what syncase needs.

* module/ice-9/psyntax.scm (strip-annotation): Use `if', not `when', for
  portability.

* module/ice-9/psyntax-pp.scm: Regenerate.
This commit is contained in:
Andy Wingo 2009-03-08 23:51:12 +01:00
parent 7118c8050c
commit 979933ab5b
3 changed files with 5 additions and 5 deletions

View file

@ -43,8 +43,8 @@
(struct-ref a 1))
(define (annotation-stripped a)
(struct-ref a 2))
(define (set-annotation-stripped! a)
(struct-set! a 2 #t))
(define (set-annotation-stripped! a stripped?)
(struct-set! a 2 stripped?))
(define (annotate e)
(let ((p (if (pair? e) (source-properties e) #f))

File diff suppressed because one or more lines are too long

View file

@ -1353,7 +1353,7 @@
(cond
((pair? x)
(let ((new (cons #f #f)))
(when parent (set-annotation-stripped! parent new))
(if parent (set-annotation-stripped! parent new))
(set-car! new (strip-annotation (car x) #f))
(set-cdr! new (strip-annotation (cdr x) #f))
new))
@ -1362,7 +1362,7 @@
(strip-annotation (annotation-expression x) x)))
((vector? x)
(let ((new (make-vector (vector-length x))))
(when parent (set-annotation-stripped! parent new))
(if parent (set-annotation-stripped! parent new))
(let loop ((i (- (vector-length x) 1)))
(unless (fx< i 0)
(vector-set! new i (strip-annotation (vector-ref x i) #f))