tag: add as_int(), as_bool() and as_float()

This commit is contained in:
Daniel Eklöf 2018-11-18 11:11:50 +01:00
parent 44a2dbb201
commit 1712362da9
2 changed files with 109 additions and 0 deletions

3
tag.h
View file

@ -10,6 +10,9 @@ struct tag {
void (*destroy)(struct tag *tag);
const char *(*name)(const struct tag *tag);
const char *(*as_string)(const struct tag *tag);
long (*as_int)(const struct tag *tag);
bool (*as_bool)(const struct tag *tag);
double (*as_float)(const struct tag *tag);
};
struct tag_set {