From cef6072905deb71f3f2277dda21a78595d295901 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sun, 29 Jan 2017 16:14:56 -0600 Subject: [PATCH] rmeta-slot: Rename wrap-rmeta-slot to build-rmeta-slot. * 8sync/rmeta-slot.scm (build-rmeta-slot): Renamed from wrap-rmeta-slot. (make-rmeta-slot): Removed. * 8sync/actors.scm (build-actions): Update caller to build-rmeta-slot. * tests/test-rmeta-slot.scm: Update tests. --- 8sync/actors.scm | 2 +- 8sync/rmeta-slot.scm | 14 +++++--------- tests/test-rmeta-slot.scm | 4 ++-- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/8sync/actors.scm b/8sync/actors.scm index d6dc148..fdeccf3 100644 --- a/8sync/actors.scm +++ b/8sync/actors.scm @@ -311,7 +311,7 @@ raise an exception if an error." "Construct an alist of (symbol . method), where the method is wrapped with wrap-apply to facilitate live hacking and allow the method definition to come after class definition." - (wrap-rmeta-slot + (build-rmeta-slot (list (cons (quote symbol) (wrap-apply method)) ...))) diff --git a/8sync/rmeta-slot.scm b/8sync/rmeta-slot.scm index 6c4ef6d..a9179ba 100644 --- a/8sync/rmeta-slot.scm +++ b/8sync/rmeta-slot.scm @@ -21,7 +21,7 @@ #:use-module (srfi srfi-9) #:use-module (ice-9 match) - #:export (wrap-rmeta-slot + #:export (build-rmeta-slot rmeta-slot-table rmeta-slot-cache maybe-build-rmeta-slot-cache! class-rmeta-ref)) @@ -42,7 +42,7 @@ ;;; (define-class () ;;; (entries #:allocation #:each-subclass ;;; #:init-thunk -;;; (wrap-rmeta-slot +;;; (build-rmeta-slot ;;; `((foo . "bar") ;;; (baz . "basil"))))) ;;; @@ -54,7 +54,7 @@ ;;; (define-class () ;;; (entries #:allocation #:each-subclass ;;; #:init-thunk -;;; (wrap-rmeta-slot +;;; (build-rmeta-slot ;;; `((foo . "foo2") ;;; (peanut . "gallery"))))) ;;; @@ -69,13 +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 (wrap-rmeta-slot table) - "In general, using wrap-rmeta-slot in combination with " +(define (build-rmeta-slot table) (lambda () - (make-rmeta-slot table))) + (%make-rmeta-slot table #f))) ;; Immutable and unique (define %the-nothing (cons '*the* '*nothing*)) diff --git a/tests/test-rmeta-slot.scm b/tests/test-rmeta-slot.scm index 46d30db..37dac50 100644 --- a/tests/test-rmeta-slot.scm +++ b/tests/test-rmeta-slot.scm @@ -28,7 +28,7 @@ (define-class () (entries #:allocation #:each-subclass #:init-thunk - (wrap-rmeta-slot + (build-rmeta-slot `((foo . "bar") (baz . "basil"))))) @@ -42,7 +42,7 @@ (define-class () (entries #:allocation #:each-subclass #:init-thunk - (wrap-rmeta-slot + (build-rmeta-slot `((foo . "foo2") (peanut . "gallery"))))) -- 2.31.1