mirror of
				https://github.com/eledio-devices/thirdparty-tinyexpr.git
				synced 2025-10-31 16:14:16 +01:00 
			
		
		
		
	Added const in te_eval.
This commit is contained in:
		| @@ -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); | ||||||
| ``` | ``` | ||||||
|   | |||||||
| @@ -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) { | ||||||
|   | |||||||
| @@ -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); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user