changeset 110359:a828354ee483

* 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.
author Lars Magne Ingebrigtsen <larsi@gnus.org>
date Tue, 14 Sep 2010 20:37:26 +0200
parents 79de2afad0d9
children 01aabf6189ef
files src/ChangeLog src/xml.c
diffstat 2 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Sep 14 16:59:42 2010 +0200
+++ b/src/ChangeLog	Tue Sep 14 20:37:26 2010 +0200
@@ -1,3 +1,9 @@
+2010-09-14  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+	* 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.
+
 2010-09-14  Jan Djärv  <jan.h.d@swipnet.se>
 
 	* xterm.c (get_current_vm_state): New function.
--- a/src/xml.c	Tue Sep 14 16:59:42 2010 +0200
+++ b/src/xml.c	Tue Sep 14 20:37:26 2010 +0200
@@ -69,11 +69,11 @@
 }
 
 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 @@
 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 @@
 the XML document.  */)
   (Lisp_Object string, Lisp_Object base_url)
 {
-  return parse_buffer (string, base_url, 0);
+  return parse_string (string, base_url, 0);
 }