diff options
author | Felipe Magno de Almeida <felipe@expertisesolutions.com.br> | 2016-02-22 05:36:15 -0300 |
---|---|---|
committer | Felipe Magno de Almeida <felipe@expertisesolutions.com.br> | 2016-02-22 05:36:15 -0300 |
commit | 8b50618691ff9f1f449bb53629d7a0203118d9f5 (patch) | |
tree | ebf74295e43705a77aaa902a49167366d600de2b | |
parent | 863ffecc3c0251d1000ceeb338e9eac4a0aefd82 (diff) | |
download | efl-8b50618691ff9f1f449bb53629d7a0203118d9f5.tar.gz |
Make benchmarks compile with new eo API
-rw-r--r-- | src/benchmarks/eo/class_simple.c | 1 | ||||
-rw-r--r-- | src/benchmarks/eo/class_simple.h | 6 | ||||
-rw-r--r-- | src/benchmarks/eo/eo_bench_callbacks.c | 5 | ||||
-rw-r--r-- | src/benchmarks/eo/eo_bench_eo_do.c | 2 |
4 files changed, 10 insertions, 4 deletions
diff --git a/src/benchmarks/eo/class_simple.c b/src/benchmarks/eo/class_simple.c index 0a57e285fa..bf310714cf 100644 --- a/src/benchmarks/eo/class_simple.c +++ b/src/benchmarks/eo/class_simple.c @@ -29,6 +29,7 @@ _a_set(Eo *obj EINA_UNUSED, void *class_data, int a) } EAPI EO_VOID_FUNC_BODYV(simple_a_set, EO_FUNC_CALL(a), int a); +#define simple_a_set(x) _EO_simple_a_set(__eo_ctx, x) static Eo_Op_Description op_desc[] = { EO_OP_FUNC(simple_a_set, _a_set), diff --git a/src/benchmarks/eo/class_simple.h b/src/benchmarks/eo/class_simple.h index 6460b0a5f5..cdfda1b943 100644 --- a/src/benchmarks/eo/class_simple.h +++ b/src/benchmarks/eo/class_simple.h @@ -6,10 +6,12 @@ typedef struct int a; } Simple_Public_Data; -EAPI void simple_a_set(int a); +EAPI void _EO_simple_a_set(void* eo_stack, int a); /* Calls simple_other_call(other, obj) and then simple_other_call(obj, other) * for 'times' times in order to grow the call stack on other objects. */ -EAPI void simple_other_call(Eo *other, int times); +EAPI void _EO_simple_other_call(void* eo_stack, Eo *other, int times); +#define simple_a_set(x) _EO_simple_a_set(__eo_ctx, x) +#define simple_other_call(other, times) _EO_simple_other_call(__eo_ctx, other, times) #define SIMPLE_CLASS simple_class_get() const Eo_Class *simple_class_get(void); diff --git a/src/benchmarks/eo/eo_bench_callbacks.c b/src/benchmarks/eo/eo_bench_callbacks.c index fde611eea1..1b355fa48c 100644 --- a/src/benchmarks/eo/eo_bench_callbacks.c +++ b/src/benchmarks/eo/eo_bench_callbacks.c @@ -48,9 +48,10 @@ bench_eo_callbacks_call(int request) 0.0030730724 }; - const int len = EINA_C_ARRAY_LENGTH(distribution); +#define length (sizeof(distribution)/sizeof(distribution[0]))/*EINA_C_ARRAY_LENGTH(distribution);*/ + const int len = length; int i, j; - Eo *obj[len] = { 0 }; + Eo *obj[length] = { 0 }; for (i = 0 ; i < len ; i++) { obj[i] = eo_add(SIMPLE_CLASS, NULL); diff --git a/src/benchmarks/eo/eo_bench_eo_do.c b/src/benchmarks/eo/eo_bench_eo_do.c index 2bcdc4246e..0c15b716b2 100644 --- a/src/benchmarks/eo/eo_bench_eo_do.c +++ b/src/benchmarks/eo/eo_bench_eo_do.c @@ -58,6 +58,8 @@ _a_set(Eo *obj, void *class_data EINA_UNUSED, int a) eo_do_super(obj, cur_klass, simple_a_set(a)); } +EAPI void _EO_simple_a_set(void* eo_stack, int a); + static Eo_Op_Description op_desc[] = { EO_OP_FUNC_OVERRIDE(simple_a_set, _a_set), }; |