aboutsummaryrefslogtreecommitdiffstats
path: root/src/benchmarks
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-03-15 12:50:20 -0400
committerCedric Bail <cedric@osg.samsung.com>2018-03-20 17:20:56 -0700
commit4c4177ac207f982de8139c47c7afedd26ff9e15a (patch)
tree1913e890dc525621f4dec3ce281b340d81608a72 /src/benchmarks
parenteo: start reporting abuse of efl_del (diff)
downloadefl-4c4177ac207f982de8139c47c7afedd26ff9e15a.tar.gz
efl: use efl_add_ref to create objects which have no parent
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Diffstat (limited to 'src/benchmarks')
-rw-r--r--src/benchmarks/eo/eo_bench_callbacks.c4
-rw-r--r--src/benchmarks/eo/eo_bench_eo_add.c6
-rw-r--r--src/benchmarks/eo/eo_bench_eo_do.c12
3 files changed, 11 insertions, 11 deletions
diff --git a/src/benchmarks/eo/eo_bench_callbacks.c b/src/benchmarks/eo/eo_bench_callbacks.c
index 7fd145c31a..7168dabfe0 100644
--- a/src/benchmarks/eo/eo_bench_callbacks.c
+++ b/src/benchmarks/eo/eo_bench_callbacks.c
@@ -16,7 +16,7 @@ static void
bench_eo_callbacks_add(int request)
{
int i;
- Eo *obj = efl_add(SIMPLE_CLASS, NULL);
+ Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
@@ -52,7 +52,7 @@ bench_eo_callbacks_call(int request)
Eo *obj[len];
for (i = 0 ; i < len ; i++)
{
- obj[i] = efl_add(SIMPLE_CLASS, NULL);
+ obj[i] = efl_add_ref(SIMPLE_CLASS, NULL);
for (j = 0 ; j < i ; j++)
{
diff --git a/src/benchmarks/eo/eo_bench_eo_add.c b/src/benchmarks/eo/eo_bench_eo_add.c
index 7bd10d8109..963cd3abb9 100644
--- a/src/benchmarks/eo/eo_bench_eo_add.c
+++ b/src/benchmarks/eo/eo_bench_eo_add.c
@@ -12,7 +12,7 @@ bench_efl_add_linear(int request)
int i;
Eo **objs = calloc(request, sizeof(Eo *));
for (i = 0 ; i < request ; i++)
- objs[i] = efl_add(SIMPLE_CLASS, NULL);
+ objs[i] = efl_add_ref(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
efl_unref(objs[i]);
@@ -25,13 +25,13 @@ bench_efl_add_jump_by_2(int request)
int i;
Eo **objs = calloc(request, sizeof(Eo *));
for (i = 0 ; i < request ; i++)
- objs[i] = efl_add(SIMPLE_CLASS, NULL);
+ objs[i] = efl_add_ref(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i += 2)
efl_unref(objs[i]);
for (i = 0 ; i < request ; i += 2)
- objs[i] = efl_add(SIMPLE_CLASS, NULL);
+ objs[i] = efl_add_ref(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
efl_unref(objs[i]);
diff --git a/src/benchmarks/eo/eo_bench_eo_do.c b/src/benchmarks/eo/eo_bench_eo_do.c
index ec69bf3145..2783b91b3c 100644
--- a/src/benchmarks/eo/eo_bench_eo_do.c
+++ b/src/benchmarks/eo/eo_bench_eo_do.c
@@ -10,7 +10,7 @@ static void
bench_eo_do_simple(int request)
{
int i;
- Eo *obj = efl_add(SIMPLE_CLASS, NULL);
+ Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
simple_a_set(obj, i);
@@ -23,8 +23,8 @@ static void
bench_eo_do_two_objs(int request)
{
int i;
- Eo *obj = efl_add(SIMPLE_CLASS, NULL);
- Eo *obj2 = efl_add(SIMPLE_CLASS, NULL);
+ Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
+ Eo *obj2 = efl_add_ref(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
simple_a_set(obj, i);
@@ -39,8 +39,8 @@ static void
bench_eo_do_two_objs_growing_stack(int request)
{
int i;
- Eo *obj = efl_add(SIMPLE_CLASS, NULL);
- Eo *obj2 = efl_add(SIMPLE_CLASS, NULL);
+ Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
+ Eo *obj2 = efl_add_ref(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
simple_other_call(obj, obj2, 20);
@@ -83,7 +83,7 @@ bench_eo_do_super(int request)
cur_klass = efl_class_new(&class_desc, SIMPLE_CLASS, NULL);
int i;
- Eo *obj = efl_add(cur_klass, NULL);
+ Eo *obj = efl_add_ref(cur_klass, NULL);
for (i = 0 ; i < request ; i++)
{
simple_a_set(obj, i);