diff options
Diffstat (limited to 'share/txr/stdlib/socket.tl')
-rw-r--r-- | share/txr/stdlib/socket.tl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/share/txr/stdlib/socket.tl b/share/txr/stdlib/socket.tl index 1c54c6eb..b6ad135e 100644 --- a/share/txr/stdlib/socket.tl +++ b/share/txr/stdlib/socket.tl @@ -142,3 +142,9 @@ (cand-prefix [pieces 0..(trunc (+ w 15) 16)]) (prefix (if (search cand-prefix '(0 0)) pieces cand-prefix))) `@(sys:in6addr-condensed-text prefix)/@(or width w)`)))) + +(defplace (sock-peer sock) body + (getter setter + ^(macrolet ((,getter () ^(sock-peer ',',sock)) + (,setter (val) ^(sock-set-peer ,',sock ,val))) + ,body))) |