@@ -55,8 +55,8 @@ foreign import ccall hexml_document_node :: Ptr CDocument -> IO (Ptr CNode)
55foreign import ccall hexml_node_children :: Ptr CDocument -> Ptr CNode -> Ptr CInt -> IO (Ptr CNode)
55foreign import ccall hexml_node_children :: Ptr CDocument -> Ptr CNode -> Ptr CInt -> IO (Ptr CNode)
56foreign import ccall hexml_node_attributes :: Ptr CDocument -> Ptr CNode -> Ptr CInt -> IO (Ptr CAttr)
56foreign import ccall hexml_node_attributes :: Ptr CDocument -> Ptr CNode -> Ptr CInt -> IO (Ptr CAttr)
58−foreign import ccall hexml_node_childBy :: Ptr CDocument -> Ptr CNode -> Ptr CNode -> CString -> CInt -> IO (Ptr CNode)
58+foreign import ccall hexml_node_child :: Ptr CDocument -> Ptr CNode -> Ptr CNode -> CString -> CInt -> IO (Ptr CNode)
59−foreign import ccall hexml_node_attributeBy :: Ptr CDocument -> Ptr CNode -> CString -> CInt -> IO (Ptr CAttr)
59+foreign import ccall hexml_node_attribute :: Ptr CDocument -> Ptr CNode -> CString -> CInt -> IO (Ptr CAttr)
61-- | A node in an XML document, created by 'parse', then calling functions such
61-- | A node in an XML document, created by 'parse', then calling functions such
62-- as 'children' on that initial 'Node'.
62-- as 'children' on that initial 'Node'.
@@ -175,7 +175,7 @@ childrenBy (Node src doc n) str = go nullPtr
176 go old = unsafePerformIO $ withForeignPtr doc $ \d ->
176 go old = unsafePerformIO $ withForeignPtr doc $ \d ->
177 BS.unsafeUseAsCStringLen str $ \(bs, len) -> do
177 BS.unsafeUseAsCStringLen str $ \(bs, len) -> do
178− r <- hexml_node_childBy d n old bs $ fromIntegral len
178+ r <- hexml_node_child d n old bs $ fromIntegral len
179 touchBS src
179 touchBS src
180 return $ if r == nullPtr then [] else Node src doc r : go r
180 return $ if r == nullPtr then [] else Node src doc r : go r
@@ -186,7 +186,7 @@ childrenBy (Node src doc n) str = go nullPtr
186attributeBy :: Node -> BS.ByteString -> Maybe Attribute
186attributeBy :: Node -> BS.ByteString -> Maybe Attribute
187attributeBy (Node src doc n) str = unsafePerformIO $ withForeignPtr doc $ \d ->
187attributeBy (Node src doc n) str = unsafePerformIO $ withForeignPtr doc $ \d ->
188 BS.unsafeUseAsCStringLen str $ \(bs, len) -> do
188 BS.unsafeUseAsCStringLen str $ \(bs, len) -> do
189− r <- hexml_node_attributeBy d n bs $ fromIntegral len
189+ r <- hexml_node_attribute d n bs $ fromIntegral len
190 touchBS src
190 touchBS src
191 return $ if r == nullPtr then Nothing else Just $ attrPeek src doc r
191 return $ if r == nullPtr then Nothing else Just $ attrPeek src doc r