Revision 20e4beae

View differences:

libavcodec/eval.c
55 55
    double (**func2)(void *, double a, double b); // NULL terminated
56 56
    char **func2_name;          // NULL terminated
57 57
    void *opaque;
58
    char **error;
58
    const char **error;
59 59
#define VARS 10
60 60
    double var[VARS];
61 61
} Parser;
......
379 379
AVEvalExpr * ff_parse(char *s, const char **const_name,
380 380
               double (**func1)(void *, double), const char **func1_name,
381 381
               double (**func2)(void *, double, double), char **func2_name,
382
               char **error){
382
               const char **error){
383 383
    Parser p;
384 384
    AVEvalExpr * e;
385 385
    char w[strlen(s) + 1], * wp = w;
......
416 416
double ff_eval2(char *s, double *const_value, const char **const_name,
417 417
               double (**func1)(void *, double), const char **func1_name,
418 418
               double (**func2)(void *, double, double), char **func2_name,
419
               void *opaque, char **error){
419
               void *opaque, const char **error){
420 420
    AVEvalExpr * e = ff_parse(s, const_name, func1, func1_name, func2, func2_name, error);
421 421
    double d;
422 422
    if (!e) return NAN;
......
430 430
               double (**func1)(void *, double), const char **func1_name,
431 431
               double (**func2)(void *, double, double), char **func2_name,
432 432
               void *opaque){
433
    char *error=NULL;
433
    const char *error=NULL;
434 434
    double ret;
435 435
    ret = ff_eval2(s, const_value, const_name, func1, func1_name, func2, func2_name, opaque, &error);
436 436
    if (error)
libavcodec/eval.h
55 55
double ff_eval2(char *s, double *const_value, const char **const_name,
56 56
               double (**func1)(void *, double), const char **func1_name,
57 57
               double (**func2)(void *, double, double), char **func2_name,
58
               void *opaque, char **error);
58
               void *opaque, const char **error);
59 59

  
60 60
typedef struct ff_expr_s AVEvalExpr;
61 61

  
......
74 74
AVEvalExpr * ff_parse(char *s, const char **const_name,
75 75
               double (**func1)(void *, double), const char **func1_name,
76 76
               double (**func2)(void *, double, double), char **func2_name,
77
               char **error);
77
               const char **error);
78 78
/**
79 79
 * Evaluates a previously parsed expression.
80 80
 * @param const_value a zero terminated array of values for the identifers from ff_parse const_name

Also available in: Unified diff