From: Joe Marshall Date: Fri, 1 Jul 2011 16:34:58 +0000 (-0700) Subject: Change default initializers from (lambda () #f) to #f. X-Git-Tag: release-9.2.0~354 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=e8ff31aa924a072c8a5ef1ee3065b6f2b6e781fc;p=mit-scheme.git Change default initializers from (lambda () #f) to #f. --- diff --git a/src/runtime/defstr.scm b/src/runtime/defstr.scm index 49115a295..652e811e4 100644 --- a/src/runtime/defstr.scm +++ b/src/runtime/defstr.scm @@ -25,7 +25,7 @@ USA. |# ;;;; Structure Definition Macro -;;; package: (runtime defstruct) +;;; package: (runtime syntax defstruct) (declare (usual-integrations)) @@ -822,7 +822,10 @@ differences: (field-names (map slot/name slots)) (inits (map (lambda (slot) - `(LAMBDA () ,(close (slot/default slot) context))) + (let ((default (slot/default slot))) + (if (false-marker? default) + #f + `(LAMBDA () ,(close default context))))) slots))) `((DEFINE ,type-name ,(if (structure/record-type? structure) diff --git a/src/runtime/record.scm b/src/runtime/record.scm index 0a1e58265..1a1a6cdb6 100644 --- a/src/runtime/record.scm +++ b/src/runtime/record.scm @@ -75,7 +75,7 @@ USA. #f "record-type" '#(DISPATCH-TAG NAME FIELD-NAMES DEFAULT-INITS EXTENSION) - (vector-cons 5 (lambda () #f)) + (vector-cons 5 #f) #f))) (set! record-type-type-tag (make-dispatch-tag type)) (%record-set! type 0 record-type-type-tag) @@ -155,7 +155,7 @@ USA. #f (->type-name type-name) names - (vector-cons n (lambda () #f)) + (vector-cons n #f) #f)) (tag (make-dispatch-tag record-type))) (%record-set! record-type 1 tag)