eina: Fixes on promises benchmark
authorLauro Moura <lauromoura@expertisesolutions.com.br>
Sat, 4 Jun 2016 16:49:51 +0000 (13:49 -0300)
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>
Mon, 6 Jun 2016 00:57:08 +0000 (21:57 -0300)
- Updated after pointer vs value change
- Updated callbacks after removal of promise argument

src/benchmarks/eina/eina_bench_promise.c

index ee6153c..90a39df 100644 (file)
@@ -44,16 +44,16 @@ struct value_type
   int h;
 };
 
-void cb(void* data EINA_UNUSED, void* value, Eina_Promise* promise EINA_UNUSED)
+void cb(void* data EINA_UNUSED, void* value)
 {
   struct value_type* p = value;
   volatile int v = p->x * p->y * p->w * p->h;
   (void)v;
 }
 
-void pointer_cb(void* data EINA_UNUSED, void* value, Eina_Promise* promise EINA_UNUSED)
+void pointer_cb(void* data EINA_UNUSED, void* value)
 {
-  struct value_type* p = *(struct value_type**)value;
+  struct value_type* p = value;
   volatile int v = p->x * p->y * p->w * p->h;
   (void)v;
 }
@@ -199,7 +199,7 @@ eina_bench_promise_copy_value_set_before_then(int request)
 
 static void indirect_free(void* p)
 {
-  free(*(void**)p);
+  free(p);
 }
 
 static void