summaryrefslogtreecommitdiff
path: root/src/benchmarks
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-08-15 14:44:41 +0100
committerTom Hacohen <tom@stosb.com>2016-08-15 15:07:42 +0100
commite65aae994e72c1d3f8ac6b5360d3772f177b77ef (patch)
tree7ecaf136e45470635889191aded2b47057720a98 /src/benchmarks
parent35abb3c34d10a4826c98055fb85ecf93915e5ea8 (diff)
downloadefl-e65aae994e72c1d3f8ac6b5360d3772f177b77ef.tar.gz
Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for Eo_Event that will follow soon. Obviously breaks both API and ABI.
Diffstat (limited to 'src/benchmarks')
-rw-r--r--src/benchmarks/eo/class_simple.c14
-rw-r--r--src/benchmarks/eo/eo_bench.c6
-rw-r--r--src/benchmarks/eo/eo_bench.h2
-rw-r--r--src/benchmarks/eo/eo_bench_callbacks.c8
-rw-r--r--src/benchmarks/eo/eo_bench_eo_add.c26
-rw-r--r--src/benchmarks/eo/eo_bench_eo_do.c34
6 files changed, 45 insertions, 45 deletions
diff --git a/src/benchmarks/eo/class_simple.c b/src/benchmarks/eo/class_simple.c
index e825291270..b8fd274191 100644
--- a/src/benchmarks/eo/class_simple.c
+++ b/src/benchmarks/eo/class_simple.c
@@ -19,7 +19,7 @@ _other_call(Eo *obj EINA_UNUSED, void *class_data EINA_UNUSED, Eo *other, int ti
}
}
-EAPI EO_VOID_FUNC_BODYV(simple_other_call, EO_FUNC_CALL(other, times), Eo *other, int times);
+EAPI EFL_VOID_FUNC_BODYV(simple_other_call, EFL_FUNC_CALL(other, times), Eo *other, int times);
static void
_a_set(Eo *obj EINA_UNUSED, void *class_data, int a)
@@ -28,23 +28,23 @@ _a_set(Eo *obj EINA_UNUSED, void *class_data, int a)
pd->a = a;
}
-EAPI EO_VOID_FUNC_BODYV(simple_a_set, EO_FUNC_CALL(a), int a);
+EAPI EFL_VOID_FUNC_BODYV(simple_a_set, EFL_FUNC_CALL(a), int a);
static Efl_Op_Description op_desc[] = {
- EO_OP_FUNC(simple_a_set, _a_set),
- EO_OP_FUNC(simple_other_call, _other_call),
+ EFL_OBJECT_OP_FUNC(simple_a_set, _a_set),
+ EFL_OBJECT_OP_FUNC(simple_other_call, _other_call),
};
static const Efl_Class_Description class_desc = {
EO_VERSION,
"Simple",
- EO_CLASS_TYPE_REGULAR,
- EO_CLASS_DESCRIPTION_OPS(op_desc),
+ EFL_CLASS_TYPE_REGULAR,
+ EFL_CLASS_DESCRIPTION_OPS(op_desc),
NULL,
sizeof(Simple_Public_Data),
NULL,
NULL
};
-EO_DEFINE_CLASS(simple_class_get, &class_desc, EO_CLASS, NULL)
+EFL_DEFINE_CLASS(simple_class_get, &class_desc, EO_CLASS, NULL)
diff --git a/src/benchmarks/eo/eo_bench.c b/src/benchmarks/eo/eo_bench.c
index 3b6584e2b1..455fd9a9cd 100644
--- a/src/benchmarks/eo/eo_bench.c
+++ b/src/benchmarks/eo/eo_bench.c
@@ -20,7 +20,7 @@ struct _Eina_Benchmark_Case
static const Eina_Benchmark_Case etc[] = {
{ "eo_do", eo_bench_eo_do },
- { "eo_add", eo_bench_eo_add },
+ { "efl_add", eo_bench_efl_add },
{ "eo_callbacks", eo_bench_callbacks },
{ NULL, NULL }
};
@@ -35,7 +35,7 @@ main(int argc, char **argv)
return -1;
eina_init();
- eo_init();
+ efl_object_init();
for (i = 0; etc[i].bench_case; ++i)
{
@@ -50,7 +50,7 @@ main(int argc, char **argv)
eina_benchmark_free(test);
}
- eo_shutdown();
+ efl_object_shutdown();
eina_shutdown();
return 0;
diff --git a/src/benchmarks/eo/eo_bench.h b/src/benchmarks/eo/eo_bench.h
index 88ee999d69..5fc14be271 100644
--- a/src/benchmarks/eo/eo_bench.h
+++ b/src/benchmarks/eo/eo_bench.h
@@ -2,7 +2,7 @@
#define EINA_BENCH_H_
void eo_bench_eo_do(Eina_Benchmark *bench);
-void eo_bench_eo_add(Eina_Benchmark *bench);
+void eo_bench_efl_add(Eina_Benchmark *bench);
void eo_bench_callbacks(Eina_Benchmark *bench);
#define _EO_BENCH_TIMES(Start, Repeat, Jump) (Start), ((Start) + ((Jump) * (Repeat))), (Jump)
diff --git a/src/benchmarks/eo/eo_bench_callbacks.c b/src/benchmarks/eo/eo_bench_callbacks.c
index ed76228c3d..4c8a9f38c2 100644
--- a/src/benchmarks/eo/eo_bench_callbacks.c
+++ b/src/benchmarks/eo/eo_bench_callbacks.c
@@ -16,14 +16,14 @@ static void
bench_eo_callbacks_add(int request)
{
int i;
- Eo *obj = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj = efl_add(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
efl_event_callback_priority_add(obj, SIMPLE_FOO, (short) i, _cb, NULL);
}
- eo_unref(obj);
+ efl_unref(obj);
}
static void
@@ -52,7 +52,7 @@ bench_eo_callbacks_call(int request)
Eo *obj[len];
for (i = 0 ; i < len ; i++)
{
- obj[i] = eo_add(SIMPLE_CLASS, NULL);
+ obj[i] = efl_add(SIMPLE_CLASS, NULL);
for (j = 0 ; j < i ; j++)
{
@@ -71,7 +71,7 @@ bench_eo_callbacks_call(int request)
for (i = 0 ; i < len ; i++)
{
- eo_unref(obj[i]);
+ efl_unref(obj[i]);
}
}
diff --git a/src/benchmarks/eo/eo_bench_eo_add.c b/src/benchmarks/eo/eo_bench_eo_add.c
index 462f3b9c56..7bd10d8109 100644
--- a/src/benchmarks/eo/eo_bench_eo_add.c
+++ b/src/benchmarks/eo/eo_bench_eo_add.c
@@ -7,41 +7,41 @@
#include "class_simple.h"
static void
-bench_eo_add_linear(int request)
+bench_efl_add_linear(int request)
{
int i;
Eo **objs = calloc(request, sizeof(Eo *));
for (i = 0 ; i < request ; i++)
- objs[i] = eo_add(SIMPLE_CLASS, NULL);
+ objs[i] = efl_add(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
- eo_unref(objs[i]);
+ efl_unref(objs[i]);
free(objs);
}
static void
-bench_eo_add_jump_by_2(int request)
+bench_efl_add_jump_by_2(int request)
{
int i;
Eo **objs = calloc(request, sizeof(Eo *));
for (i = 0 ; i < request ; i++)
- objs[i] = eo_add(SIMPLE_CLASS, NULL);
+ objs[i] = efl_add(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i += 2)
- eo_unref(objs[i]);
+ efl_unref(objs[i]);
for (i = 0 ; i < request ; i += 2)
- objs[i] = eo_add(SIMPLE_CLASS, NULL);
+ objs[i] = efl_add(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
- eo_unref(objs[i]);
+ efl_unref(objs[i]);
free(objs);
}
-void eo_bench_eo_add(Eina_Benchmark *bench)
+void eo_bench_efl_add(Eina_Benchmark *bench)
{
- eina_benchmark_register(bench, "eo_add_linear",
- EINA_BENCHMARK(bench_eo_add_linear), _EO_BENCH_TIMES(1000, 10, 50000));
- eina_benchmark_register(bench, "eo_add_jump_by_2",
- EINA_BENCHMARK(bench_eo_add_jump_by_2), _EO_BENCH_TIMES(1000, 10, 50000));
+ eina_benchmark_register(bench, "efl_add_linear",
+ EINA_BENCHMARK(bench_efl_add_linear), _EO_BENCH_TIMES(1000, 10, 50000));
+ eina_benchmark_register(bench, "efl_add_jump_by_2",
+ EINA_BENCHMARK(bench_efl_add_jump_by_2), _EO_BENCH_TIMES(1000, 10, 50000));
}
diff --git a/src/benchmarks/eo/eo_bench_eo_do.c b/src/benchmarks/eo/eo_bench_eo_do.c
index 485f29725f..d9279901e1 100644
--- a/src/benchmarks/eo/eo_bench_eo_do.c
+++ b/src/benchmarks/eo/eo_bench_eo_do.c
@@ -10,44 +10,44 @@ static void
bench_eo_do_simple(int request)
{
int i;
- Eo *obj = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj = efl_add(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
simple_a_set(obj, i);
}
- eo_unref(obj);
+ efl_unref(obj);
}
static void
bench_eo_do_two_objs(int request)
{
int i;
- Eo *obj = eo_add(SIMPLE_CLASS, NULL);
- Eo *obj2 = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj = efl_add(SIMPLE_CLASS, NULL);
+ Eo *obj2 = efl_add(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
simple_a_set(obj, i);
simple_a_set(obj2, i);
}
- eo_unref(obj);
- eo_unref(obj2);
+ efl_unref(obj);
+ efl_unref(obj2);
}
static void
bench_eo_do_two_objs_growing_stack(int request)
{
int i;
- Eo *obj = eo_add(SIMPLE_CLASS, NULL);
- Eo *obj2 = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj = efl_add(SIMPLE_CLASS, NULL);
+ Eo *obj2 = efl_add(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
simple_other_call(obj, obj2, 20);
}
- eo_unref(obj);
- eo_unref(obj2);
+ efl_unref(obj);
+ efl_unref(obj2);
}
static const Efl_Class *cur_klass;
@@ -55,11 +55,11 @@ static const Efl_Class *cur_klass;
static void
_a_set(Eo *obj, void *class_data EINA_UNUSED, int a)
{
- simple_a_set(eo_super(obj, cur_klass), a);
+ simple_a_set(efl_super(obj, cur_klass), a);
}
static Efl_Op_Description op_desc[] = {
- EO_OP_FUNC_OVERRIDE(simple_a_set, _a_set),
+ EFL_OBJECT_OP_FUNC_OVERRIDE(simple_a_set, _a_set),
};
static void
@@ -68,23 +68,23 @@ bench_eo_do_super(int request)
static Efl_Class_Description class_desc = {
EO_VERSION,
"Simple2",
- EO_CLASS_TYPE_REGULAR,
- EO_CLASS_DESCRIPTION_OPS(op_desc),
+ EFL_CLASS_TYPE_REGULAR,
+ EFL_CLASS_DESCRIPTION_OPS(op_desc),
NULL,
0,
NULL,
NULL
};
- cur_klass = eo_class_new(&class_desc, SIMPLE_CLASS, NULL);
+ cur_klass = efl_class_new(&class_desc, SIMPLE_CLASS, NULL);
int i;
- Eo *obj = eo_add(cur_klass, NULL);
+ Eo *obj = efl_add(cur_klass, NULL);
for (i = 0 ; i < request ; i++)
{
simple_a_set(obj, i);
}
- eo_unref(obj);
+ efl_unref(obj);
}
void eo_bench_eo_do(Eina_Benchmark *bench)