summaryrefslogtreecommitdiffstats
path: root/libnetdata/eval/eval.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:00 +0000
commit03bf87dcb06f7021bfb2df2fa8691593c6148aff (patch)
treee16b06711a2ed77cafb4b7754be0220c3d14a9d7 /libnetdata/eval/eval.h
parentAdding upstream version 1.36.1. (diff)
downloadnetdata-upstream/1.37.0.tar.xz
netdata-upstream/1.37.0.zip
Adding upstream version 1.37.0.upstream/1.37.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libnetdata/eval/eval.h')
-rw-r--r--libnetdata/eval/eval.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/libnetdata/eval/eval.h b/libnetdata/eval/eval.h
index 086d171aa..1633ec505 100644
--- a/libnetdata/eval/eval.h
+++ b/libnetdata/eval/eval.h
@@ -18,8 +18,7 @@ typedef enum rrdcalc_status {
} RRDCALC_STATUS;
typedef struct eval_variable {
- char *name;
- uint32_t hash;
+ STRING *name;
struct eval_variable *next;
} EVAL_VARIABLE;
@@ -70,19 +69,19 @@ typedef struct eval_expression {
// parse the given string as an expression and return:
// a pointer to an expression if it parsed OK
// NULL in which case the pointer to error has the error code
-extern EVAL_EXPRESSION *expression_parse(const char *string, const char **failed_at, int *error);
+EVAL_EXPRESSION *expression_parse(const char *string, const char **failed_at, int *error);
// free all resources allocated for an expression
-extern void expression_free(EVAL_EXPRESSION *expression);
+void expression_free(EVAL_EXPRESSION *expression);
// convert an error code to a message
-extern const char *expression_strerror(int error);
+const char *expression_strerror(int error);
// evaluate an expression and return
// 1 = OK, the result is in: expression->result
// 2 = FAILED, the error message is in: buffer_tostring(expression->error_msg)
-extern int expression_evaluate(EVAL_EXPRESSION *expression);
+int expression_evaluate(EVAL_EXPRESSION *expression);
-extern int health_variable_lookup(const char *variable, uint32_t hash, struct rrdcalc *rc, NETDATA_DOUBLE *result);
+int health_variable_lookup(STRING *variable, struct rrdcalc *rc, NETDATA_DOUBLE *result);
#endif //NETDATA_EVAL_H