From: Chris Hanson Date: Mon, 24 Oct 2005 05:31:07 +0000 (+0000) Subject: Fix bug: explicitly-defined record unparsers installed during cold X-Git-Tag: 20090517-FFI~1200 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=bba01a4a19060a677f5c281f088c70451e3fa317;p=mit-scheme.git Fix bug: explicitly-defined record unparsers installed during cold load weren't being seen. --- diff --git a/v7/src/runtime/record.scm b/v7/src/runtime/record.scm index 608dffdff..da7679c54 100644 --- a/v7/src/runtime/record.scm +++ b/v7/src/runtime/record.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: record.scm,v 1.54 2005/09/08 19:12:37 cph Exp $ +$Id: record.scm,v 1.55 2005/10/24 05:31:07 cph Exp $ Copyright 1989,1990,1991,1993,1994,1996 Massachusetts Institute of Technology Copyright 1997,2002,2003,2004,2005 Massachusetts Institute of Technology @@ -228,9 +228,15 @@ USA. (define set-record-type-unparser-method! (named-lambda (set-record-type-unparser-method!/booting record-type method) - (set! deferred-unparser-methods - (cons (cons record-type method) deferred-unparser-methods)) - unspecific)) + (let loop ((ms deferred-unparser-methods)) + (if (pair? ms) + (if (eq? (caar ms) record-type) + (set-cdr! (car ms) method) + (loop (cdr ms))) + (begin + (set! deferred-unparser-methods + (cons (cons record-type method) deferred-unparser-methods)) + unspecific))))) (define deferred-unparser-methods '())