X-Git-Url: https://jxself.org/git/?p=8sync.git;a=blobdiff_plain;f=8sync%2Factors.scm;h=886e11405fb8586e3edd92fa6329ae79011083b0;hp=9b079b8a1754c788ac860a8cbccf78904f1a5b42;hb=fa2ee688df757fd5d7409b0787651b2124a8ce6a;hpb=d0a86ba4c62607a2051729a81844adabb2760b25 diff --git a/8sync/actors.scm b/8sync/actors.scm index 9b079b8..886e114 100644 --- a/8sync/actors.scm +++ b/8sync/actors.scm @@ -295,15 +295,13 @@ raise an exception if an error." ;; @@: There's no reason not to use #:class instead of ;; #:each-subclass anywhere in this file, except for ;; Guile bug #25211 (#:class is broken in Guile 2.2) - #:allocation #:each-subclass) + #:allocation #:each-subclass + #:getter actor-message-handler) ;; This is the default, "simple" way to inherit and process messages. (actions #:init-value '() #:allocation #:each-subclass)) -(define-method (actor-message-handler (actor )) - (slot-ref actor 'message-handler)) - ;;; So these are the nicer representations of addresses. ;;; However, they don't serialize so easily with scheme read/write, so we're ;;; using the simpler cons cell version below for now. @@ -322,13 +320,13 @@ raise an exception if an error." ;; (define (make-address actor-id hive-id) - (cons actor-id hive-id)) + (vector actor-id hive-id)) (define (address-actor-id address) - (car address)) + (vector-ref address 0)) (define (address-hive-id address) - (cdr address)) + (vector-ref address 1)) (define (address->string address) (string-append (address-actor-id address) "@"