~singpolyma/haskell-gnutls

3ae486f63d12db737e94d56df252c0240f7461c9 — Stephen Paul Weber 7 months ago b32c661
gnu_record_recv returns ssize_t

This is needed so errors can be detected properly, since they are
negative returns.
1 files changed, 2 insertions(+), 1 deletions(-)

M lib/Network/Protocol/TLS/GNU/Foreign.hs
M lib/Network/Protocol/TLS/GNU/Foreign.hs => lib/Network/Protocol/TLS/GNU/Foreign.hs +2 -1
@@ 19,6 19,7 @@ module Network.Protocol.TLS.GNU.Foreign where

import           Foreign
import           Foreign.C
import           System.Posix.Types (CSsize(..))

-- Type aliases {{{



@@ 222,7 223,7 @@ foreign import ccall safe "gnutls_record_get_max_size"
	gnutls_record_get_max_size :: Session -> IO CSize

foreign import ccall safe "gnutls_record_recv"
	gnutls_record_recv :: Session -> Ptr a -> CSize -> IO CSize
	gnutls_record_recv :: Session -> Ptr a -> CSize -> IO CSsize

foreign import ccall safe "gnutls_record_send"
	gnutls_record_send :: Session -> Ptr a -> CSize -> IO CSize