Commit 3c92c69b authored by Max Kellermann's avatar Max Kellermann

Tag: add "pure" attributes

parent 52ee132d
...@@ -150,6 +150,7 @@ struct Tag { ...@@ -150,6 +150,7 @@ struct Tag {
* Checks whether the tag contains one or more items with * Checks whether the tag contains one or more items with
* the specified type. * the specified type.
*/ */
gcc_pure
bool HasType(tag_type type) const; bool HasType(tag_type type) const;
private: private:
...@@ -160,6 +161,7 @@ private: ...@@ -160,6 +161,7 @@ private:
* Parse the string, and convert it into a #tag_type. Returns * Parse the string, and convert it into a #tag_type. Returns
* #TAG_NUM_OF_ITEM_TYPES if the string could not be recognized. * #TAG_NUM_OF_ITEM_TYPES if the string could not be recognized.
*/ */
gcc_pure
enum tag_type enum tag_type
tag_name_parse(const char *name); tag_name_parse(const char *name);
...@@ -169,6 +171,7 @@ tag_name_parse(const char *name); ...@@ -169,6 +171,7 @@ tag_name_parse(const char *name);
* *
* Case does not matter. * Case does not matter.
*/ */
gcc_pure
enum tag_type enum tag_type
tag_name_parse_i(const char *name); tag_name_parse_i(const char *name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment