[MLton-commit] r6428

Matthew Fluet fluet at mlton.org
Sun Mar 2 14:27:40 PST 2008


Rename functions
----------------------------------------------------------------------

U   mlton/trunk/basis-library/net/inet-sock.sml
U   mlton/trunk/basis-library/net/net-host-db.sig
U   mlton/trunk/basis-library/net/net-host-db.sml
U   mlton/trunk/basis-library/net/socket.sig
U   mlton/trunk/basis-library/net/socket.sml
U   mlton/trunk/basis-library/net/unix-sock.sml

----------------------------------------------------------------------

Modified: mlton/trunk/basis-library/net/inet-sock.sml
===================================================================
--- mlton/trunk/basis-library/net/inet-sock.sml	2008-03-02 22:26:51 UTC (rev 6427)
+++ mlton/trunk/basis-library/net/inet-sock.sml	2008-03-02 22:27:39 UTC (rev 6428)
@@ -22,7 +22,7 @@
             val port = Word16.fromInt port
                        handle Overflow => PosixError.raiseSys PosixError.inval
             val port = Net.Word16.hton port
-            val (sa, salen, finish) = Socket.new_sock_addr ()
+            val (sa, salen, finish) = Socket.newSockAddr ()
             val _ = Prim.toAddr (NetHostDB.inAddrToWord8Vector in_addr,
                                  port, sa, salen)
 
@@ -38,7 +38,7 @@
           val port = Prim.getPort ()
           val port = Net.Word16.ntoh port
           val port = Word16.toInt port
-          val (ia, finish) = NetHostDB.new_in_addr ()
+          val (ia, finish) = NetHostDB.newInAddr ()
           val _ = Prim.getInAddr (NetHostDB.preInAddrToWord8Array ia)
         in
           (finish (), port)

Modified: mlton/trunk/basis-library/net/net-host-db.sig
===================================================================
--- mlton/trunk/basis-library/net/net-host-db.sig	2008-03-02 22:26:51 UTC (rev 6427)
+++ mlton/trunk/basis-library/net/net-host-db.sig	2008-03-02 22:27:39 UTC (rev 6428)
@@ -24,6 +24,6 @@
 
       val any: unit -> in_addr
       val inAddrToWord8Vector: in_addr -> Word8.word vector
-      val new_in_addr: unit -> pre_in_addr * (unit -> in_addr)
+      val newInAddr: unit -> pre_in_addr * (unit -> in_addr)
       val preInAddrToWord8Array: pre_in_addr -> Word8.word array
    end

Modified: mlton/trunk/basis-library/net/net-host-db.sml
===================================================================
--- mlton/trunk/basis-library/net/net-host-db.sml	2008-03-02 22:26:51 UTC (rev 6427)
+++ mlton/trunk/basis-library/net/net-host-db.sml	2008-03-02 22:27:39 UTC (rev 6428)
@@ -17,7 +17,7 @@
       val inAddrToWord8Vector = fn v => v
 
       val inAddrLen = C_Size.toInt Prim.inAddrSize
-      fun new_in_addr () =
+      fun newInAddr () =
         let
           val ia: pre_in_addr = Array.array (inAddrLen, 0wx0: Word8.word)
           fun finish () = Array.vector ia
@@ -26,7 +26,7 @@
         end
       fun any () =
          let
-            val (wa, finish) = new_in_addr ()
+            val (wa, finish) = newInAddr ()
             fun loop (i, acc) =
                if i >= inAddrLen
                   then ()

Modified: mlton/trunk/basis-library/net/socket.sig
===================================================================
--- mlton/trunk/basis-library/net/socket.sig	2008-03-02 22:26:51 UTC (rev 6427)
+++ mlton/trunk/basis-library/net/socket.sig	2008-03-02 22:27:39 UTC (rev 6428)
@@ -171,7 +171,7 @@
     val fdToSock: Posix.FileSys.file_desc -> ('af, 'sock_type) sock
     type pre_sock_addr
     val unpackSockAddr: 'af sock_addr -> Word8.word vector
-    val new_sock_addr: unit -> (pre_sock_addr * C_Socklen.t ref * (unit -> 'af sock_addr))
+    val newSockAddr: unit -> (pre_sock_addr * C_Socklen.t ref * (unit -> 'af sock_addr))
 
     structure CtlExtra:
        sig

Modified: mlton/trunk/basis-library/net/socket.sml
===================================================================
--- mlton/trunk/basis-library/net/socket.sml	2008-03-02 22:26:51 UTC (rev 6427)
+++ mlton/trunk/basis-library/net/socket.sml	2008-03-02 22:27:39 UTC (rev 6428)
@@ -22,7 +22,7 @@
 type pre_sock_addr = Word8.word array
 datatype sock_addr = SA of Word8.word vector
 fun unpackSockAddr (SA sa) = sa
-fun new_sock_addr (): (pre_sock_addr * C_Socklen.t ref * (unit -> sock_addr)) = 
+fun newSockAddr (): (pre_sock_addr * C_Socklen.t ref * (unit -> sock_addr)) = 
    let
       val salen = C_Size.toInt Prim.sockAddrStorageLen
       val sa = Array.array (salen, 0wx0)
@@ -340,7 +340,7 @@
       local
          fun getName (s, f: sock * pre_sock_addr * C_Socklen.t ref -> C_Int.int C_Errno.t) =
             let
-               val (sa, salen, finish) = new_sock_addr ()
+               val (sa, salen, finish) = newSockAddr ()
                val () = Syscall.simple (fn () => f (s, sa, salen))
             in
                finish ()
@@ -413,7 +413,7 @@
 
 fun accept s =
    let
-      val (sa, salen, finish) = new_sock_addr ()
+      val (sa, salen, finish) = newSockAddr ()
       val s = Syscall.simpleResultRestart (fn () => Prim.accept (s, sa, salen))
    in
       (s, finish ())
@@ -421,7 +421,7 @@
 
 fun acceptNB s =
    let
-      val (sa, salen, finish) = new_sock_addr ()
+      val (sa, salen, finish) = newSockAddr ()
    in
       nonBlock
       (C_Int.fromInt ~1, 
@@ -630,7 +630,7 @@
 fun recvArrFrom' (s, sl, in_flags) =
    let
       val (buf, i, sz) = Word8ArraySlice.base sl
-      val (sa, salen, finish) = new_sock_addr ()
+      val (sa, salen, finish) = newSockAddr ()
       val n =
          (C_SSize.toInt o Syscall.simpleResultRestart')
          ({errVal = C_SSize.castFromFixedInt ~1}, fn () => 
@@ -687,7 +687,7 @@
 fun recvArrFromNB' (s, sl, in_flags) =
    let
       val (buf, i, sz) = Word8ArraySlice.base sl
-      val (sa, salen, finish) = new_sock_addr ()
+      val (sa, salen, finish) = newSockAddr ()
    in
       nonBlock
       (C_SSize.castFromFixedInt ~1,
@@ -700,7 +700,7 @@
 fun recvVecFromNB' (s, n, in_flags) =
    let
       val a = Word8Array.arrayUninit n
-      val (sa, salen, finish) = new_sock_addr ()
+      val (sa, salen, finish) = newSockAddr ()
    in
       nonBlock
       (C_SSize.castFromFixedInt ~1,

Modified: mlton/trunk/basis-library/net/unix-sock.sml
===================================================================
--- mlton/trunk/basis-library/net/unix-sock.sml	2008-03-02 22:26:51 UTC (rev 6427)
+++ mlton/trunk/basis-library/net/unix-sock.sml	2008-03-02 22:27:39 UTC (rev 6428)
@@ -18,7 +18,7 @@
 
       fun toAddr s = 
         let
-          val (sa, salen, finish) = Socket.new_sock_addr ()
+          val (sa, salen, finish) = Socket.newSockAddr ()
           val _ = Prim.toAddr (NullString.nullTerm s, 
                                C_Size.fromInt (String.size s), 
                                sa, salen)




More information about the MLton-commit mailing list