summaryrefslogtreecommitdiff
path: root/src/xml.c
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2010-09-14 20:37:26 +0200
committerLars Magne Ingebrigtsen <larsi@gnus.org>2010-09-14 20:37:26 +0200
commitc97c655f5f1e26f3fdde6d5907afcd9ab4cd5bf1 (patch)
tree07b45b2db729d45d712733fd9b0549d1859cb39d /src/xml.c
parent5e2a84e30d41c4804111d8b2b3d74b40da1c3f57 (diff)
downloademacs-c97c655f5f1e26f3fdde6d5907afcd9ab4cd5bf1.tar.gz
* xml.c (parse_string): Renamed to parse_string(), since that's
what it does. (parse_string): Return nil when the document can't be parsed.
Diffstat (limited to 'src/xml.c')
-rw-r--r--src/xml.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xml.c b/src/xml.c
index eb844950d05..ddecabb5317 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -69,11 +69,11 @@ Lisp_Object make_dom (xmlNode *node)
}
static Lisp_Object
-parse_buffer (Lisp_Object string, Lisp_Object base_url, int htmlp)
+parse_string (Lisp_Object string, Lisp_Object base_url, int htmlp)
{
xmlDoc *doc;
xmlNode *node;
- Lisp_Object result;
+ Lisp_Object result = Qnil;
int ibeg, iend;
char *burl = "";
@@ -114,7 +114,7 @@ If BASE-URL is non-nil, it will be used to expand relative URLs in
the HTML document. */)
(Lisp_Object string, Lisp_Object base_url)
{
- return parse_buffer (string, base_url, 1);
+ return parse_string (string, base_url, 1);
}
DEFUN ("xml-parse-string", Fxml_parse_string, Sxml_parse_string,
@@ -124,7 +124,7 @@ If BASE-URL is non-nil, it will be used to expand relative URLs in
the XML document. */)
(Lisp_Object string, Lisp_Object base_url)
{
- return parse_buffer (string, base_url, 0);
+ return parse_string (string, base_url, 0);
}