X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=8sync%2Frmeta-slot.scm;h=a9179ba56718492d03e4817f1d9ac942a1b5d031;hb=fa598a979d510a783f1d6f097f560f23de997c88;hp=7a3fe32e00e71ebb806c8f2d4dab5d9a879addfd;hpb=87b644abbb799eb42e2010bba4358658867f1ff4;p=8sync.git diff --git a/8sync/rmeta-slot.scm b/8sync/rmeta-slot.scm index 7a3fe32..a9179ba 100644 --- a/8sync/rmeta-slot.scm +++ b/8sync/rmeta-slot.scm @@ -21,7 +21,8 @@ #:use-module (srfi srfi-9) #:use-module (ice-9 match) - #:export (make-rmeta-slot + #:export (build-rmeta-slot + rmeta-slot-table rmeta-slot-cache maybe-build-rmeta-slot-cache! class-rmeta-ref)) @@ -40,8 +41,8 @@ ;;; ;; Define a class with a meta-slot ;;; (define-class () ;;; (entries #:allocation #:each-subclass -;;; #:init-value -;;; (make-rmeta-slot +;;; #:init-thunk +;;; (build-rmeta-slot ;;; `((foo . "bar") ;;; (baz . "basil"))))) ;;; @@ -52,8 +53,8 @@ ;;; ;; Define a subclass ;;; (define-class () ;;; (entries #:allocation #:each-subclass -;;; #:init-value -;;; (make-rmeta-slot +;;; #:init-thunk +;;; (build-rmeta-slot ;;; `((foo . "foo2") ;;; (peanut . "gallery"))))) ;;; @@ -68,8 +69,9 @@ (table rmeta-slot-table) (cache rmeta-slot-cache set-rmeta-slot-cache!)) -(define (make-rmeta-slot table) - (%make-rmeta-slot table #f)) +(define (build-rmeta-slot table) + (lambda () + (%make-rmeta-slot table #f))) ;; Immutable and unique (define %the-nothing (cons '*the* '*nothing*))