[FFmpeg-cvslog] r22859 - in trunk/libavcodec: eval.c eval.h

stefano subversion
Mon Apr 12 21:21:19 CEST 2010


Author: stefano
Date: Mon Apr 12 21:21:19 2010
New Revision: 22859

Log:
Change constness for func[12]_name parameters of ff_parse_expr() and
ff_parse_and_eval_expr().

Change attribute from "const char **" to "const char * const *".
The name arrays are not supposed to be changed by the function.

Modified:
   trunk/libavcodec/eval.c
   trunk/libavcodec/eval.h

Modified: trunk/libavcodec/eval.c
==============================================================================
--- trunk/libavcodec/eval.c	Mon Apr 12 21:21:15 2010	(r22858)
+++ trunk/libavcodec/eval.c	Mon Apr 12 21:21:19 2010	(r22859)
@@ -35,9 +35,9 @@ typedef struct Parser{
     const double *const_value;
     const char * const *const_name;          // NULL terminated
     double (**func1)(void *, double a); // NULL terminated
-    const char **func1_name;          // NULL terminated
+    const char * const *func1_name;          // NULL terminated
     double (**func2)(void *, double a, double b); // NULL terminated
-    const char **func2_name;          // NULL terminated
+    const char * const *func2_name;          // NULL terminated
     void *opaque;
     const char **error;
 #define VARS 10
@@ -370,8 +370,8 @@ static int verify_expr(AVExpr * e) {
 }
 
 AVExpr *ff_parse_expr(const char *s, const char * const *const_name,
-               double (**func1)(void *, double), const char **func1_name,
-               double (**func2)(void *, double, double), const char **func2_name,
+               double (**func1)(void *, double), const char * const *func1_name,
+               double (**func2)(void *, double, double), const char * const *func2_name,
                const char **error){
     Parser p;
     AVExpr *e = NULL;
@@ -413,8 +413,8 @@ double ff_eval_expr(AVExpr * e, const do
 }
 
 double ff_parse_and_eval_expr(const char *s, const double *const_value, const char * const *const_name,
-               double (**func1)(void *, double), const char **func1_name,
-               double (**func2)(void *, double, double), const char **func2_name,
+               double (**func1)(void *, double), const char * const *func1_name,
+               double (**func2)(void *, double, double), const char * const *func2_name,
                void *opaque, const char **error){
     AVExpr * e = ff_parse_expr(s, const_name, func1, func1_name, func2, func2_name, error);
     double d;

Modified: trunk/libavcodec/eval.h
==============================================================================
--- trunk/libavcodec/eval.h	Mon Apr 12 21:21:15 2010	(r22858)
+++ trunk/libavcodec/eval.h	Mon Apr 12 21:21:19 2010	(r22859)
@@ -44,8 +44,8 @@ typedef struct AVExpr AVExpr;
  * @return the value of the expression
  */
 double ff_parse_and_eval_expr(const char *s, const double *const_value, const char * const *const_name,
-               double (**func1)(void *, double), const char **func1_name,
-               double (**func2)(void *, double, double), const char **func2_name,
+               double (**func1)(void *, double), const char * const *func1_name,
+               double (**func2)(void *, double, double), const char * const *func2_name,
                void *opaque, const char **error);
 
 /**
@@ -62,8 +62,8 @@ double ff_parse_and_eval_expr(const char
  *         NULL if anything went wrong
  */
 AVExpr *ff_parse_expr(const char *s, const char * const *const_name,
-               double (**func1)(void *, double), const char **func1_name,
-               double (**func2)(void *, double, double), const char **func2_name,
+               double (**func1)(void *, double), const char * const *func1_name,
+               double (**func2)(void *, double, double), const char * const *func2_name,
                const char **error);
 
 /**



More information about the ffmpeg-cvslog mailing list