diff options
author | Maria Matejka <mq@ucw.cz> | 2019-07-02 10:45:53 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2019-07-02 10:45:53 +0200 |
commit | b40c0f028f37086991fefa9197708ba8c7b3d571 (patch) | |
tree | 91721f9ab6b49c86c43e2c83e6acd628ae0c0bae /filter/data.c | |
parent | 30667d50417f926fc948905aaab3e679b416b2e1 (diff) | |
download | bird-b40c0f028f37086991fefa9197708ba8c7b3d571.tar.gz |
Filter: Pre-evaluation of constant expressions
Diffstat (limited to 'filter/data.c')
-rw-r--r-- | filter/data.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/filter/data.c b/filter/data.c index 912e2b00..db55070f 100644 --- a/filter/data.c +++ b/filter/data.c @@ -514,6 +514,15 @@ val_format(const struct f_val *v, buffer *buf) } } +char * +val_format_str(struct linpool *lp, const struct f_val *v) { + buffer b; + LOG_BUFFER_INIT(b); + val_format(v, &b); + return lp_strdup(lp, b.start); +} + + static char val_dump_buffer[1024]; const char * val_dump(const struct f_val *v) { |