Browse Source

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.
Christopher Allan Webber 2 years ago
parent
commit
cef6072905
3 changed files with 8 additions and 12 deletions
  1. 1 1
      8sync/actors.scm
  2. 5 9
      8sync/rmeta-slot.scm
  3. 2 2
      tests/test-rmeta-slot.scm

+ 1 - 1
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)) ...)))
 

+ 5 - 9
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 <kah-lassy> ()
 ;;;     (entries #:allocation #:each-subclass
 ;;;              #:init-thunk
-;;;              (wrap-rmeta-slot
+;;;              (build-rmeta-slot
 ;;;               `((foo . "bar")
 ;;;                 (baz . "basil")))))
 ;;;
@@ -54,7 +54,7 @@
 ;;;   (define-class <sub-lassy> (<kah-lassy>)
 ;;;     (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*))

+ 2 - 2
tests/test-rmeta-slot.scm

@@ -28,7 +28,7 @@
 (define-class <kah-lassy> ()
   (entries #:allocation #:each-subclass
            #:init-thunk
-           (wrap-rmeta-slot
+           (build-rmeta-slot
             `((foo . "bar")
               (baz . "basil")))))
 
@@ -42,7 +42,7 @@
 (define-class <sub-lassy> (<kah-lassy>)
   (entries #:allocation #:each-subclass
            #:init-thunk
-           (wrap-rmeta-slot
+           (build-rmeta-slot
             `((foo . "foo2")
               (peanut . "gallery")))))