From: <cod...@go...> - 2008-12-07 14:21:51
|
Author: jam...@us... Date: Sun Dec 7 05:59:55 2008 New Revision: 363 Modified: branches/objc2/hoc/HOC/HOC/NewClass.hs Log: Renamed new "raw" ffi functions (created for handling IvarList and MethodList types as ForeignPtrs) in NewClass.hs to be more consistent with previously-existing ones. Modified: branches/objc2/hoc/HOC/HOC/NewClass.hs ============================================================================== --- branches/objc2/hoc/HOC/HOC/NewClass.hs (original) +++ branches/objc2/hoc/HOC/HOC/NewClass.hs Sun Dec 7 05:59:55 2008 @@ -31,7 +31,7 @@ newtype IvarList = IvarList (ForeignPtr IvarList) foreign import ccall "NewClass.h newClass" - c_newClass :: Ptr ObjCObject -> CString + rawNewClass :: Ptr ObjCObject -> CString -> Ptr IvarList -> Ptr MethodList -> Ptr MethodList -> IO () @@ -44,7 +44,7 @@ withForeignPtr ivars $ \ivars -> withForeignPtr ms $ \ms -> withForeignPtr cms $ \cms -> do - c_newClass sc name ivars ms cms + rawNewClass sc name ivars ms cms foreign import ccall "NewClass.h makeMethodList" rawMakeMethodList :: Int -> IO (Ptr MethodList) @@ -56,14 +56,14 @@ foreign import ccall "NewClass.h makeIvarList" - c_makeIvarList :: Int -> IO (Ptr IvarList) + rawMakeIvarList :: Int -> IO (Ptr IvarList) foreign import ccall "NewClass.h setIvarInList" - c_setIvarInList :: Ptr IvarList -> Int + rawSetIvarInList :: Ptr IvarList -> Int -> CString -> CString -> CSize -> Word8 -> IO () makeIvarList :: Int -> IO IvarList makeIvarList n = do - ivars <- c_makeIvarList n + ivars <- rawMakeIvarList n ivars <- newForeignPtr freePtr ivars return (IvarList ivars) @@ -71,7 +71,7 @@ -> CString -> CString -> CSize -> Word8 -> IO () setIvarInList (IvarList ivars) n name ty sz align = withForeignPtr ivars $ \ivars -> do - c_setIvarInList ivars n name ty sz align + rawSetIvarInList ivars n name ty sz align makeMethodList :: Int -> IO MethodList makeMethodList n = do |