on master help sign in
Merge pull request #11 from dbeacham/unsafe-ffi

Fix #10: Import common FFI calls as unsafe

commit854cdb95416b84b8bcb62d9512c0ed96f7ecae6d authorNeil Mitchell <ndmitchell@gmail.com> dateMon 22 May 2017, 11:29 (9 years ago) parent3b65521dff7834
1 file changed+6−6
src/Text/XML/Hexml.hs+6−6
src/Text/XML/Hexml.hs+6−6
@@ -49,14 +49,14 @@ foreign import ccall hexml_document_parse :: CString -> CInt -> IO (Ptr CDocumen
4949foreign import ccall hexml_document_free :: Ptr CDocument -> IO ()
5050foreign import ccall "&hexml_document_free" hexml_document_free_funptr :: FunPtr (Ptr CDocument -> IO ())
5151foreign import ccall hexml_node_render :: Ptr CDocument -> Ptr CNode -> CString -> CInt -> IO CInt
52−foreign import ccall hexml_document_error :: Ptr CDocument -> IO CString
53−foreign import ccall hexml_document_node :: Ptr CDocument -> IO (Ptr CNode)
52+foreign import ccall unsafe hexml_document_error :: Ptr CDocument -> IO CString
53+foreign import ccall unsafe hexml_document_node :: Ptr CDocument -> IO (Ptr CNode)
5454
55−foreign import ccall hexml_node_children :: Ptr CDocument -> Ptr CNode -> Ptr CInt -> IO (Ptr CNode)
56−foreign import ccall hexml_node_attributes :: Ptr CDocument -> Ptr CNode -> Ptr CInt -> IO (Ptr CAttr)
55+foreign import ccall unsafe hexml_node_children :: Ptr CDocument -> Ptr CNode -> Ptr CInt -> IO (Ptr CNode)
56+foreign import ccall unsafe hexml_node_attributes :: Ptr CDocument -> Ptr CNode -> Ptr CInt -> IO (Ptr CAttr)
5757
58−foreign import ccall hexml_node_child :: Ptr CDocument -> Ptr CNode -> Ptr CNode -> CString -> CInt -> IO (Ptr CNode)
59−foreign import ccall hexml_node_attribute :: Ptr CDocument -> Ptr CNode -> CString -> CInt -> IO (Ptr CAttr)
58+foreign import ccall unsafe hexml_node_child :: Ptr CDocument -> Ptr CNode -> Ptr CNode -> CString -> CInt -> IO (Ptr CNode)
59+foreign import ccall unsafe hexml_node_attribute :: Ptr CDocument -> Ptr CNode -> CString -> CInt -> IO (Ptr CAttr)
6060
6161-- | A node in an XML document, created by 'parse', then calling functions such
6262-- as 'children' on that initial 'Node'.