]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/windows/privileges/privileges.factor
continuations[-docs]: add the finally word
[factor.git] / basis / windows / privileges / privileges.factor
index e04dfa016a0c4ac73978852184c867b1ec70c836..1d124fcbfa8ac5de7d8f699043bd6474a52cf9d6 100644 (file)
@@ -25,7 +25,7 @@ TYPEDEF: TOKEN_PRIVILEGES* PTOKEN_PRIVILEGES
     ! quot: ( token-handle -- token-handle )
     [ open-process-token ] dip
     [ keep ] curry
-    [ CloseHandle drop ] [ ] cleanup ; inline
+    [ CloseHandle drop ] finally ; inline
 
 : lookup-privilege ( string -- luid )
     [ f ] dip LUID <struct>
@@ -52,4 +52,4 @@ TYPEDEF: TOKEN_PRIVILEGES* PTOKEN_PRIVILEGES
 : with-privileges ( seq quot -- )
     [ '[ _ [ t set-privilege ] each @ ] ]
     [ drop '[ _ [ f set-privilege ] each ] ]
-    2bi [ ] cleanup ; inline
+    2bi finally ; inline