 {#pointer *xine_video_port_t as VideoPort foreign newtype#}
 {#pointer *xine_stream_t as Stream foreign newtype#}
 
+-- XXX: just a hack. We really want to be able to pass
+-- custom structs to functions. See 'withData', 'xine_open_audio_driver'.
 newtype Data = Data (Ptr Data)
 
 -- | Media Resource Locator.

-- Portability : not portable
--
-- A simple binding to xine-lib. Low-level bindings.

module Xine.Foreign (
    -- * Version information

peekInt :: Ptr CInt -> IO Int
peekInt = liftM cint2int . peek

-- For pointers which may be NULL.
maybeForeignPtr_ c x | x == nullPtr = return Nothing
                     | otherwise    = (Just . c) `liftM` newForeignPtr_ x

