diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2021-05-27 21:05:48 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2021-05-27 21:21:22 +0100 |
commit | 15781e565dd7f436c7056939d6d33831b63b78fb (patch) | |
tree | ed1bb2634660a66303179a2566ae645c08165cdc /src/treebuilder/element-type.h | |
parent | 0f2caec353bc7302168cdc2c0575441e43b44c3e (diff) | |
download | libhubbub-15781e565dd7f436c7056939d6d33831b63b78fb.tar.gz libhubbub-15781e565dd7f436c7056939d6d33831b63b78fb.tar.bz2 |
treebuilder: Return to running gperf at build time.
Now we include the generated C file directly, in a new C file.
Diffstat (limited to 'src/treebuilder/element-type.h')
-rw-r--r-- | src/treebuilder/element-type.h | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/treebuilder/element-type.h b/src/treebuilder/element-type.h index a8e33d9..93b168c 100644 --- a/src/treebuilder/element-type.h +++ b/src/treebuilder/element-type.h @@ -42,11 +42,6 @@ struct element_type_map { element_type type; }; -/* Generated by gperf */ -const struct element_type_map *hubbub_element_type_lookup( - register const char *str, - register size_t len); - /** * Convert an element name into an element type * @@ -54,22 +49,9 @@ const struct element_type_map *hubbub_element_type_lookup( * \param tag_name The tag name to consider * \return The corresponding element type */ -static inline element_type element_type_from_name( +element_type element_type_from_name( hubbub_treebuilder *treebuilder, - const hubbub_string *tag_name) -{ - const struct element_type_map *value; - - UNUSED(treebuilder); - - value = hubbub_element_type_lookup((const char *)tag_name->ptr, - tag_name->len); - if (value == NULL) { - return UNKNOWN; - } - - return value->type; -} + const hubbub_string *tag_name); #endif |