Added const in te_eval.

This commit is contained in:
Lewis Van Winkle
2016-01-21 15:05:10 -06:00
parent dc84b66be6
commit 9beeff7f58
3 changed files with 3 additions and 3 deletions

View File

@@ -117,7 +117,7 @@ TINYEXPR defines only five functions:
```C ```C
double te_interp(const char *expression, int *error); double te_interp(const char *expression, int *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 *lookup, int lookup_len, int *error);
double te_eval(te_expr *n); double te_eval(const te_expr *n);
void te_print(const te_expr *n); void te_print(const te_expr *n);
void te_free(te_expr *n); void te_free(te_expr *n);
``` ```

View File

@@ -306,7 +306,7 @@ static te_expr *expr(state *s) {
} }
double te_eval(te_expr *n) { double te_eval(const te_expr *n) {
double ret; double ret;
if (n->bound) { if (n->bound) {

View File

@@ -61,7 +61,7 @@ double te_interp(const char *expression, int *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 *lookup, int lookup_len, int *error);
/* Evaluates the expression. */ /* Evaluates the expression. */
double te_eval(te_expr *n); double te_eval(const te_expr *n);
/* Prints debugging information on the syntax tree. */ /* Prints debugging information on the syntax tree. */
void te_print(const te_expr *n); void te_print(const te_expr *n);