r13567 jmb - in /trunk/libdom/bindings/hubbub: parser.c parser.h

netsurf at semichrome.net netsurf at semichrome.net
Fri Mar 23 22:38:01 GMT 2012


Author: jmb
Date: Fri Mar 23 17:38:01 2012
New Revision: 13567

URL: http://source.netsurf-browser.org?rev=13567&view=rev
Log:
Fix encoding_source namespace collision

Modified:
    trunk/libdom/bindings/hubbub/parser.c
    trunk/libdom/bindings/hubbub/parser.h

Modified: trunk/libdom/bindings/hubbub/parser.c
URL: http://source.netsurf-browser.org/trunk/libdom/bindings/hubbub/parser.c?rev=13567&r1=13566&r2=13567&view=diff
==============================================================================
--- trunk/libdom/bindings/hubbub/parser.c (original)
+++ trunk/libdom/bindings/hubbub/parser.c Fri Mar 23 17:38:01 2012
@@ -137,8 +137,8 @@
 	parser->parser = NULL;
 	parser->doc = NULL;
 	parser->encoding = enc;
-	parser->encoding_source = enc != NULL ? ENCODING_SOURCE_HEADER
-					      : ENCODING_SOURCE_DETECTED;
+	parser->encoding_source = enc != NULL ? DOM_HUBBUB_ENCODING_SOURCE_HEADER
+					      : DOM_HUBBUB_ENCODING_SOURCE_DETECTED;
 	parser->complete = false;
 
 	parser->msg = msg;
@@ -772,7 +772,7 @@
 	name = hubbub_parser_read_charset(dom_parser->parser, &source);
 
 	if (source == HUBBUB_CHARSET_CONFIDENT) {
-		dom_parser->encoding_source = ENCODING_SOURCE_DETECTED;
+		dom_parser->encoding_source = DOM_HUBBUB_ENCODING_SOURCE_DETECTED;
 		dom_parser->encoding = charset;
 		return HUBBUB_OK;
 	}
@@ -788,7 +788,7 @@
 	 * reprocessing with a different charset, or for confirming that the
 	 * charset is in fact correct */
 	dom_parser->encoding = charset;
-	dom_parser->encoding_source = ENCODING_SOURCE_META;
+	dom_parser->encoding_source = DOM_HUBBUB_ENCODING_SOURCE_META;
 
 	/* Equal encodings will have the same string pointers */
 	return (charset == name) ? HUBBUB_OK : HUBBUB_ENCODINGCHANGE;

Modified: trunk/libdom/bindings/hubbub/parser.h
URL: http://source.netsurf-browser.org/trunk/libdom/bindings/hubbub/parser.h?rev=13567&r1=13566&r2=13567&view=diff
==============================================================================
--- trunk/libdom/bindings/hubbub/parser.h (original)
+++ trunk/libdom/bindings/hubbub/parser.h Fri Mar 23 17:38:01 2012
@@ -20,10 +20,10 @@
 typedef struct dom_hubbub_parser dom_hubbub_parser;
 
 /* The encoding source of the document */
-typedef enum dom_hubub_encoding_source { 
-	ENCODING_SOURCE_HEADER, 
-	ENCODING_SOURCE_DETECTED,
-	ENCODING_SOURCE_META 
+typedef enum dom_hubbub_encoding_source { 
+	DOM_HUBBUB_ENCODING_SOURCE_HEADER, 
+	DOM_HUBBUB_ENCODING_SOURCE_DETECTED,
+	DOM_HUBBUB_ENCODING_SOURCE_META 
 } dom_hubbub_encoding_source;
 
 /* The recommended way to use the parser is:




More information about the netsurf-commits mailing list