diff --git a/tinyexpr.c b/tinyexpr.c index bb734cb..f3bc4d8 100644 --- a/tinyexpr.c +++ b/tinyexpr.c @@ -350,11 +350,11 @@ static void optimize(te_expr *n) { } -te_expr *te_compile(const char *expression, const te_variable *lookup, int lookup_len, int *error) { +te_expr *te_compile(const char *expression, const te_variable *variables, int var_count, int *error) { state s; s.start = s.next = expression; - s.lookup = lookup; - s.lookup_len = lookup_len; + s.lookup = variables; + s.lookup_len = var_count; next_token(&s); te_expr *root = expr(&s); diff --git a/tinyexpr.h b/tinyexpr.h index 5a4def8..90ae90b 100644 --- a/tinyexpr.h +++ b/tinyexpr.h @@ -55,7 +55,7 @@ double te_interp(const char *expression, int *error); /* Parses the input expression and binds variables. */ /* Returns NULL on error. */ -te_expr *te_compile(const char *expression, const te_variable *lookup, int lookup_len, int *error); +te_expr *te_compile(const char *expression, const te_variable *variables, int var_count, int *error); /* Evaluates the expression. */ double te_eval(const te_expr *n);