From: ross Date: Wed, 3 Mar 2004 11:47:42 +0000 (+0000) Subject: [project @ 2004-03-03 11:47:42 by ross] X-Git-Tag: nhc98-1-18-release~355 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=dc6191d7fc5cc8eba99e3f27869bb08be758a170;p=ghc-base.git [project @ 2004-03-03 11:47:42 by ross] withObject -> with --- diff --git a/GHC/IO.hs b/GHC/IO.hs index 27b59f1..b58c8cd 100644 --- a/GHC/IO.hs +++ b/GHC/IO.hs @@ -410,7 +410,7 @@ hPutChar handle c = LineBuffering -> hPutcBuffered handle_ True c BlockBuffering _ -> hPutcBuffered handle_ False c NoBuffering -> - withObject (castCharToCChar c) $ \buf -> do + with (castCharToCChar c) $ \buf -> do writeRawBufferPtr "hPutChar" (fromIntegral fd) (haIsStream handle_) buf 0 1 return () diff --git a/System/Time.hsc b/System/Time.hsc index ac89d41..e342ac3 100644 --- a/System/Time.hsc +++ b/System/Time.hsc @@ -427,14 +427,14 @@ throwAwayReturnPointer fun x y = fun x y >> return () clockToCalendarTime_static :: (Ptr CTime -> IO (Ptr CTm)) -> Bool -> ClockTime -> IO CalendarTime clockToCalendarTime_static fun is_utc (TOD secs psec) = do - withObject (fromIntegral secs :: CTime) $ \ p_timer -> do + with (fromIntegral secs :: CTime) $ \ p_timer -> do p_tm <- fun p_timer -- can't fail, according to POSIX clockToCalendarTime_aux is_utc p_tm psec clockToCalendarTime_reentrant :: (Ptr CTime -> Ptr CTm -> IO ()) -> Bool -> ClockTime -> IO CalendarTime clockToCalendarTime_reentrant fun is_utc (TOD secs psec) = do - withObject (fromIntegral secs :: CTime) $ \ p_timer -> do + with (fromIntegral secs :: CTime) $ \ p_timer -> do allocaBytes (#const sizeof(struct tm)) $ \ p_tm -> do fun p_timer p_tm clockToCalendarTime_aux is_utc p_tm psec