The Birdfont Source Code


All Repositories / birdfont.git / commit – 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
author Johan Mattsson <johan.mattsson.m@gmail.com>
Mon, 25 May 2015 13:59:05 +0000 (15:59 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Mon, 25 May 2015 13:59:05 +0000 (15:59 +0200)
commit 4fc624c7cb3b3ced5740dc78189e8217ea6c657d
tree c075bb8d5ebff85d6e0b6ec4d983448bb8299955
parent 7ebaa1e6c60c14bdfd9591df2d71c032bcb6f4d9
Revert "Faster xml parsing"

This reverts commit 09bdb33481f43f87774dc5ace9fa1938470b9c57.

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;