]> gitweb.factorcode.org Git - factor.git/commitdiff
io.sockets.secure: simplify with-secure-context
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 28 Apr 2023 04:53:31 +0000 (21:53 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 28 Apr 2023 04:54:06 +0000 (21:54 -0700)
basis/io/sockets/secure/secure.factor

index 2827c9d60c7f0d835a2a74924b8b6cdda73c8eca..1d23fdd6943197124ab70b15cbdc5b6802bddf1f 100644 (file)
@@ -51,10 +51,8 @@ TUPLE: secure-context < disposable config handle ;
 HOOK: <secure-context> secure-socket-backend ( config -- context )
 
 : with-secure-context ( config quot -- )
-    [
-        [ <secure-context> ] [ [ secure-context set ] prepose ] bi*
-        with-disposal
-    ] with-scope ; inline
+    [ <secure-context> ] dip
+    '[ secure-context _ with-variable ] with-disposal ; inline
 
 TUPLE: secure
     { addrspec read-only }