The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Revert "Faster xml parsing"

These changes was commited to the Birdfont repository Mon, 25 May 2015 13:59:05 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Mon, 25 May 2015 13:59:05 +0000]

Updated Files

libbirdxml/Tag.vala
libbirdxml/XmlString.vala
--- a/libbirdxml/Tag.vala +++ b/libbirdxml/Tag.vala @@ -149,8 +149,7 @@ int end; int closing_tag; XmlString? d; - char* start_tag_data; - + XmlString name; XmlString attributes; XmlString content; @@ -170,7 +169,6 @@ return new Tag.empty (); } - index += data.find_char ('<'); while (data.get_next_char (ref index, out c)) { if (c == '<') { separator = find_next_separator (index);
--- a/libbirdxml/XmlString.vala +++ b/libbirdxml/XmlString.vala @@ -114,21 +114,6 @@ Posix.assert (len + offset < length); return new XmlString (data + offset, len); } - - internal int find_char (char needle) { - char* haystack = data; - char c = data[0]; - int i = 0; - - while (c != '\0') { - if (haystack[i] == needle) { - return i; - } - i++; - } - - return -1; - } public string to_string () { unowned string s = (string) data;