]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/io/sockets/windows/nt/nt.factor
Updating code to use with-out-parameters
[factor.git] / basis / io / sockets / windows / nt / nt.factor
old mode 100755 (executable)
new mode 100644 (file)
index 0dd8595..17e92b9
@@ -17,7 +17,7 @@ M: winnt WSASocket-flags ( -- DWORD )
     SIO_GET_EXTENSION_FUNCTION_POINTER
     WSAID_CONNECTEX
     GUID heap-size
-    void* <c-object>
+    { void* }
     [
         void* heap-size
         DWORD <c-object>
@@ -26,7 +26,7 @@ M: winnt WSASocket-flags ( -- DWORD )
         WSAIoctl SOCKET_ERROR = [
             winsock-error-string throw
         ] when
-    ] keep *void* ;
+    ] [ ] with-out-parameters ;
 
 TUPLE: ConnectEx-args port
     s name namelen lpSendBuffer dwSendDataLength
@@ -55,9 +55,9 @@ TUPLE: ConnectEx-args port
         [ lpOverlapped>> ]
         [ ptr>> ]
     } cleave
-    "int"
-    { "SOCKET" "sockaddr_in*" "int" "PVOID" "DWORD" "LPDWORD" "void*" }
-    "stdcall" alien-indirect drop
+    int
+    { SOCKET void* int PVOID DWORD LPDWORD void* }
+    stdcall alien-indirect drop
     winsock-error-string [ throw ] when* ; inline
 
 M: object establish-connection ( client-out remote -- )