summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorhinder <hinder@17b73243-c579-4c4c-a9d2-2d5706c11dac>2012-11-30 17:36:20 +0000
committerhinder <hinder@17b73243-c579-4c4c-a9d2-2d5706c11dac>2012-11-30 17:36:20 +0000
commita8569cd218d3d9aa7c690ad71a6ee9467fa0e1d4 (patch)
tree665d8403fce5d2cdfc7e5daa82b22ee6589cb34b /src/util
parenta0bd060db561a961ae72700cdc4bea5fa28b15a4 (diff)
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
Diffstat (limited to 'src/util')
-rw-r--r--src/util/Expression.c6
1 files changed, 3 insertions, 3 deletions
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];