Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tobias Decking
GHC
Commits
1b233e22
Commit
1b233e22
authored
Feb 03, 1999
by
simonm
Browse files
[project @ 1999-02-03 09:08:01 by simonm]
boundsOfByteArray --> boundsOfMutableByteArray
parent
9c7a7ae8
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/lib/misc/SocketPrim.lhs
View file @
1b233e22
...
...
@@ -278,7 +278,7 @@ bindSocket (MkSocket s _family _stype _protocol socketStatus) addr = do
show currentStatus))
else do
addr' <- packSockAddr addr
let (_,sz) = boundsOfByteArray addr'
let (_,sz) = boundsOf
Mutable
ByteArray addr'
status <- _ccall_ bindSocket s addr' sz (isDomainSocket::Int)
case (status::Int) of
-1 -> constructErrorAndFail "bindSocket"
...
...
@@ -313,7 +313,7 @@ connect (MkSocket s _family _stype _protocol socketStatus) addr = do
show currentStatus))
else do
addr' <- packSockAddr addr
let (_,sz) = boundsOfByteArray addr'
let (_,sz) = boundsOf
Mutable
ByteArray addr'
status <- _ccall_ connectSocket s addr' sz (isDomainSocket::Int)
case (status::Int) of
-1 -> constructErrorAndFail "connect"
...
...
@@ -425,7 +425,7 @@ sendTo (MkSocket s _family _stype _protocol status) xs addr = do
show currentStatus))
else do
addr' <- packSockAddr addr
let (_,sz) = boundsOfByteArray addr'
let (_,sz) = boundsOf
Mutable
ByteArray addr'
nbytes <- _ccall_ sendTo__ s xs (length xs) addr' sz
case (nbytes::Int) of
-1 -> constructErrorAndFail "sendTo"
...
...
@@ -1130,13 +1130,13 @@ allocSockAddr :: Family -> IO (MutableByteArray RealWorld Int, Int)
#ifndef cygwin32_TARGET_OS
allocSockAddr AF_UNIX = do
ptr <- allocChars ``sizeof(struct sockaddr_un)''
let (_,sz) = boundsOfByteArray ptr
let (_,sz) = boundsOf
Mutable
ByteArray ptr
return (ptr, sz)
#endif
allocSockAddr AF_INET = do
ptr <- allocChars ``sizeof(struct sockaddr_in)''
let (_,sz) = boundsOfByteArray ptr
let (_,sz) = boundsOf
Mutable
ByteArray ptr
return (ptr, sz)
-------------------------------------------------------------------------------
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment