                  => objectT
                  -> IO [flagsT]
 mkObjectGetFlags object =
-    liftM (toFlags . fromIntegral) $
+    liftM cToFlags $
         withObject (toObject object) cObjectGetFlags
 foreign import ccall unsafe "_hs_gst_object_flags"
     cObjectGetFlags :: Ptr Object

           return $ Segment (realToFrac rate)
                            (realToFrac absRate)
                            (cToEnum format)
                            (toFlags $ fromIntegral flags)
                            (fromIntegral start)
                            (fromIntegral stop)
                            (fromIntegral time)

                     => miniObjectT
                     -> [flagsT]
mkMiniObjectGetFlags miniObject =
    cToFlags $ unsafePerformIO $
        withMiniObject (toMiniObject miniObject) cMiniObjectGetFlags
foreign import ccall unsafe "_hs_gst_mini_object_flags"
    cMiniObjectGetFlags :: Ptr MiniObject
