[FFmpeg-devel] [PATCH 08/12] Change const qualifier for func[12]_names parameters of ff_parse_expr() and ff_parse_and_eval_expr().

Stefano Sabatini stefano.sabatini-lala
Mon Apr 12 00:37:50 CEST 2010


Change from "const char **char" to "const char * const *", which look
more correct.
---
 libavcodec/eval.c |   12 ++++++------
 libavcodec/eval.h |    8 ++++----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/libavcodec/eval.c b/libavcodec/eval.c
index 3eab671..540236a 100644
--- a/libavcodec/eval.c
+++ b/libavcodec/eval.c
@@ -41,9 +41,9 @@ typedef struct Parser {
     const double *var_values;
     const char * const *var_names;      // NULL terminated
     double (**func1)(void *, double a); // NULL terminated
-    const char **func1_names;           // NULL terminated
+    const char * const *func1_names;    // NULL terminated
     double (**func2)(void *, double a, double b); // NULL terminated
-    const char **func2_names;           // NULL terminated
+    const char * const *func2_names;    // NULL terminated
     void *opaque;
 #define VARS 10
     double var[VARS];
@@ -436,8 +436,8 @@ static int verify_expr(AVExpr *e)
 }
 
 int ff_parse_expr(AVExpr **expr, const char *s, const char * const *var_names,
-                  double (**func1)(void *, double), const char **func1_names,
-                  double (**func2)(void *, double, double), const char **func2_names,
+                  double (**func1)(void *, double), const char * const *func1_names,
+                  double (**func2)(void *, double, double), const char * const *func2_names,
                   void *log_ctx)
 {
     Parser p;
@@ -481,8 +481,8 @@ double ff_eval_expr(AVExpr *e, const double *var_values, void *opaque)
 }
 
 int ff_parse_and_eval_expr(double *res, const char *s, const double *var_values, const char * const *var_names,
-                           double (**func1)(void *, double), const char **func1_names,
-                           double (**func2)(void *, double, double), const char **func2_names,
+                           double (**func1)(void *, double), const char * const *func1_names,
+                           double (**func2)(void *, double, double), const char * const *func2_names,
                            void *opaque, void *log_ctx)
 {
     AVExpr *e;
diff --git a/libavcodec/eval.h b/libavcodec/eval.h
index 696b82e..52b81af 100644
--- a/libavcodec/eval.h
+++ b/libavcodec/eval.h
@@ -47,8 +47,8 @@ typedef struct AVExpr AVExpr;
  */
 int ff_parse_and_eval_expr(double *res, const char *s,
                            const double *var_values, const char * const *var_names,
-                           double (**func1)(void *, double), const char **func1_names,
-                           double (**func2)(void *, double, double), const char **func2_names,
+                           double (**func1)(void *, double), const char * const *func1_names,
+                           double (**func2)(void *, double, double), const char * const *func2_names,
                            void *opaque, void *log_ctx);
 
 /**
@@ -67,8 +67,8 @@ int ff_parse_and_eval_expr(double *res, const char *s,
  * AVERROR code in case of failure
  */
 int ff_parse_expr(AVExpr **expr, const char *s, const char * const *var_names,
-                  double (**func1)(void *, double), const char **func1_names,
-                  double (**func2)(void *, double, double), const char **func2_names,
+                  double (**func1)(void *, double), const char * const *func1_names,
+                  double (**func2)(void *, double, double), const char * const *func2_names,
                   void *log_ctx);
 
 /**
-- 
1.7.0




More information about the ffmpeg-devel mailing list