loudmouth/lm-parser.c
changeset 399 b5ebdc9d8152
parent 188 a99cacb7a907
child 400 5a4f3a49212a
--- a/loudmouth/lm-parser.c	Sat Jun 07 11:21:42 2008 +0200
+++ b/loudmouth/lm-parser.c	Sat Jun 07 11:22:19 2008 +0200
@@ -239,10 +239,10 @@
 	return parser;
 }
 
-void
+gboolean
 lm_parser_parse (LmParser *parser, const gchar *string)
 {
-	g_return_if_fail (parser != NULL);
+	g_return_val_if_fail (parser != NULL, FALSE);
 	
         if (!parser->context) {
                 parser->context = g_markup_parse_context_new (parser->m_parser, 0,
@@ -250,10 +250,12 @@
         }
         
         if (g_markup_parse_context_parse (parser->context, string, 
-                                          (gssize)strlen (string), NULL)) {
+					  (gssize)strlen (string), NULL)) {
+		return TRUE;
         } else {
 		g_markup_parse_context_free (parser->context);
 		parser->context = NULL;
+		return FALSE;
         }
 }