[libgepub/wip/cosimoc/api-rework: 6/13] doc: use htmlReadMemory()
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgepub/wip/cosimoc/api-rework: 6/13] doc: use htmlReadMemory()
- Date: Sat, 18 Jun 2016 21:13:12 +0000 (UTC)
commit 731155df7e2f631a54e4ca38f4cd8df9907d0601
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sat Jun 18 12:30:07 2016 -0700
doc: use htmlReadMemory()
Since we have a size, this is the correct method to use.
libgepub/gepub-doc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libgepub/gepub-doc.c b/libgepub/gepub-doc.c
index 640e49f..bdaef5a 100644
--- a/libgepub/gepub-doc.c
+++ b/libgepub/gepub-doc.c
@@ -507,7 +507,7 @@ gepub_doc_get_text (GepubDoc *doc)
if (!res) {
return NULL;
}
- xdoc = htmlReadDoc (res, "", NULL, HTML_PARSE_NOWARNING | HTML_PARSE_NOERROR);
+ xdoc = htmlReadMemory (res, size, "", NULL, HTML_PARSE_NOWARNING | HTML_PARSE_NOERROR);
root_element = xmlDocGetRootElement (xdoc);
texts = gepub_utils_get_text_elements (root_element);
@@ -539,7 +539,7 @@ gepub_doc_get_text_by_id (GepubDoc *doc, gchar *id)
return NULL;
}
- xdoc = htmlReadDoc (res, "", NULL, HTML_PARSE_NOWARNING | HTML_PARSE_NOERROR);
+ xdoc = htmlReadMemory (res, size, "", NULL, HTML_PARSE_NOWARNING | HTML_PARSE_NOERROR);
root_element = xmlDocGetRootElement (xdoc);
texts = gepub_utils_get_text_elements (root_element);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]