[gimp] app: Use a properly typed callback function



commit 54e2d5fb6831cb15e45d83bdcd3f13ba5afdf85c
Author: Mukund Sivaraman <muks banu com>
Date:   Mon Apr 25 19:16:28 2011 +0530

    app: Use a properly typed callback function
    
    This fixes a compiler warning with the typeless proto arg.

 app/composite/gimp-composite-regression.c |    2 +-
 app/composite/gimp-composite-regression.h |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/app/composite/gimp-composite-regression.c b/app/composite/gimp-composite-regression.c
index e845f3f..cec6ed1 100644
--- a/app/composite/gimp-composite-regression.c
+++ b/app/composite/gimp-composite-regression.c
@@ -441,7 +441,7 @@ gimp_composite_regression_timer_report (char *name, double t1, double t2)
  * Return value:
  **/
 double
-gimp_composite_regression_time_function (gulong iterations, void (*func)(), GimpCompositeContext *ctx)
+gimp_composite_regression_time_function (gulong iterations, GimpCompositeRegressionFunc func, GimpCompositeContext *ctx)
 {
   struct timeval t0;
   struct timeval t1;
diff --git a/app/composite/gimp-composite-regression.h b/app/composite/gimp-composite-regression.h
index b4134a6..81428df 100644
--- a/app/composite/gimp-composite-regression.h
+++ b/app/composite/gimp-composite-regression.h
@@ -85,6 +85,8 @@ typedef struct
 } gimp_rgba32_t;
 #endif
 
+typedef void (*GimpCompositeRegressionFunc) (GimpCompositeContext *ctx);
+
 extern void gimp_composite_regression_print_vector (guchar vector[],
                                                                                                                                                                                                                                                                                                                                                                                                                                 GimpPixelFormat format,
                                                                                                                                                                                                                                                                                                                                                                                                                                 gulong n_pixels);
@@ -103,7 +105,7 @@ extern void gimp_composite_regression_print_vector_rgba8 (gimp_rgba8_t v[],
 
 
 extern double gimp_composite_regression_time_function (gulong iterations,
-                                                                                                                                                                                                                                                                                                                                                                                                                                                        void (*func)(),
+                                                                                                                                                                                                                                                                                                                                                                                                                                                        GimpCompositeRegressionFunc func,
                                                                                                                                                                                                                                                                                                                                                                                                                                                         GimpCompositeContext *ctx);
 extern int gimp_composite_regression_comp_rgba8 (char *str,
                                                                                                                                                                                                                                                                                                                                                                                                         gimp_rgba8_t *rgba8A,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]