@@ -48,7 +48,7 @@ instance Storable Str where
48foreign import ccall document_parse :: CString -> CInt -> IO (Ptr CDocument)
48foreign import ccall document_parse :: CString -> CInt -> IO (Ptr CDocument)
49foreign import ccall document_free :: Ptr CDocument -> IO ()
49foreign import ccall document_free :: Ptr CDocument -> IO ()
50foreign import ccall "&document_free" document_free_funptr :: FunPtr (Ptr CDocument -> IO ())
50foreign import ccall "&document_free" document_free_funptr :: FunPtr (Ptr CDocument -> IO ())
51−foreign import ccall document_render :: Ptr CDocument -> CString -> CInt -> IO CInt
51+foreign import ccall node_render :: Ptr CDocument -> Ptr CNode -> CString -> CInt -> IO CInt
52foreign import ccall document_error :: Ptr CDocument -> IO CString
52foreign import ccall document_error :: Ptr CDocument -> IO CString
53foreign import ccall document_node :: Ptr CDocument -> IO (Ptr CNode)
53foreign import ccall document_node :: Ptr CDocument -> IO (Ptr CNode)
@@ -86,8 +86,9 @@ documentParse src = unsafePerformIO $ BS.unsafeUseAsCStringLen (src <> BS.single
87documentRender :: Document -> BS.ByteString
87documentRender :: Document -> BS.ByteString
88documentRender (Document _ doc) = unsafePerformIO $ withForeignPtr doc $ \d -> do
88documentRender (Document _ doc) = unsafePerformIO $ withForeignPtr doc $ \d -> do
89− i <- document_render d nullPtr 0
90+ i <- node_render d n nullPtr 0
90− BS.create (fromIntegral i) $ \ptr -> void $ document_render d (castPtr ptr) i
91+ BS.create (fromIntegral i) $ \ptr -> void $ node_render d n (castPtr ptr) i
93documentNode :: Document -> Node
94documentNode :: Document -> Node