From a8569cd218d3d9aa7c690ad71a6ee9467fa0e1d4 Mon Sep 17 00:00:00 2001 From: hinder Date: Fri, 30 Nov 2012 17:36:20 +0000 Subject: Make data parameter of expression evaluation functions const data is a pointer to user-supplied data used for evaluating the expression. It should not be modified by the evaluation. Note that this modifies the flesh API to the (undocumented) thorn-visible function Util_ExpressionEvaluate. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4922 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/util/Expression.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/util') diff --git a/src/util/Expression.c b/src/util/Expression.c index 96b5ccb4..2d80522c 100644 --- a/src/util/Expression.c +++ b/src/util/Expression.c @@ -252,7 +252,7 @@ uExpression Util_ExpressionParse(const char *expression) @endvar @var eval @vdesc Variable evaluation function - @vtype int (*eval)(int, const char * const *, uExpressionValue *, void *), + @vtype int (*eval)(int, const char * const *, uExpressionValue *, const void *), @vio in @vcomment This function is called with an array of variables to determine the values of @@ -275,8 +275,8 @@ uExpression Util_ExpressionParse(const char *expression) @@*/ int Util_ExpressionEvaluate(const uExpression buffer, uExpressionValue *retval, - int (*eval)(int, const char * const *, uExpressionValue *, void *), - void *data) + int (*eval)(int, const char * const *, uExpressionValue *, const void *), + const void *data) { int retcode; uExpressionValue stack[MAX_STACK_SIZE]; -- cgit v1.2.3