summaryrefslogtreecommitdiff
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
parenta1bf513920e813037756e01cc2e01770befea77c (diff)
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 7fd145c3..7168dab 100644
--- a/src/benchmarks/eo/eo_bench_callbacks.c
+++ b/src/benchmarks/eo/eo_bench_callbacks.c
@@ -16,7 +16,7 @@ static void
16bench_eo_callbacks_add(int request) 16bench_eo_callbacks_add(int request)
17{ 17{
18 int i; 18 int i;
19 Eo *obj = efl_add(SIMPLE_CLASS, NULL); 19 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
20 20
21 for (i = 0 ; i < request ; i++) 21 for (i = 0 ; i < request ; i++)
22 { 22 {
@@ -52,7 +52,7 @@ bench_eo_callbacks_call(int request)
52 Eo *obj[len]; 52 Eo *obj[len];
53 for (i = 0 ; i < len ; i++) 53 for (i = 0 ; i < len ; i++)
54 { 54 {
55 obj[i] = efl_add(SIMPLE_CLASS, NULL); 55 obj[i] = efl_add_ref(SIMPLE_CLASS, NULL);
56 56
57 for (j = 0 ; j < i ; j++) 57 for (j = 0 ; j < i ; j++)
58 { 58 {
diff --git a/src/benchmarks/eo/eo_bench_eo_add.c b/src/benchmarks/eo/eo_bench_eo_add.c
index 7bd10d8..963cd3a 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)
12 int i; 12 int i;
13 Eo **objs = calloc(request, sizeof(Eo *)); 13 Eo **objs = calloc(request, sizeof(Eo *));
14 for (i = 0 ; i < request ; i++) 14 for (i = 0 ; i < request ; i++)
15 objs[i] = efl_add(SIMPLE_CLASS, NULL); 15 objs[i] = efl_add_ref(SIMPLE_CLASS, NULL);
16 16
17 for (i = 0 ; i < request ; i++) 17 for (i = 0 ; i < request ; i++)
18 efl_unref(objs[i]); 18 efl_unref(objs[i]);
@@ -25,13 +25,13 @@ bench_efl_add_jump_by_2(int request)
25 int i; 25 int i;
26 Eo **objs = calloc(request, sizeof(Eo *)); 26 Eo **objs = calloc(request, sizeof(Eo *));
27 for (i = 0 ; i < request ; i++) 27 for (i = 0 ; i < request ; i++)
28 objs[i] = efl_add(SIMPLE_CLASS, NULL); 28 objs[i] = efl_add_ref(SIMPLE_CLASS, NULL);
29 29
30 for (i = 0 ; i < request ; i += 2) 30 for (i = 0 ; i < request ; i += 2)
31 efl_unref(objs[i]); 31 efl_unref(objs[i]);
32 32
33 for (i = 0 ; i < request ; i += 2) 33 for (i = 0 ; i < request ; i += 2)
34 objs[i] = efl_add(SIMPLE_CLASS, NULL); 34 objs[i] = efl_add_ref(SIMPLE_CLASS, NULL);
35 35
36 for (i = 0 ; i < request ; i++) 36 for (i = 0 ; i < request ; i++)
37 efl_unref(objs[i]); 37 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 ec69bf3..2783b91 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
10bench_eo_do_simple(int request) 10bench_eo_do_simple(int request)
11{ 11{
12 int i; 12 int i;
13 Eo *obj = efl_add(SIMPLE_CLASS, NULL); 13 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
14 for (i = 0 ; i < request ; i++) 14 for (i = 0 ; i < request ; i++)
15 { 15 {
16 simple_a_set(obj, i); 16 simple_a_set(obj, i);
@@ -23,8 +23,8 @@ static void
23bench_eo_do_two_objs(int request) 23bench_eo_do_two_objs(int request)
24{ 24{
25 int i; 25 int i;
26 Eo *obj = efl_add(SIMPLE_CLASS, NULL); 26 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
27 Eo *obj2 = efl_add(SIMPLE_CLASS, NULL); 27 Eo *obj2 = efl_add_ref(SIMPLE_CLASS, NULL);
28 for (i = 0 ; i < request ; i++) 28 for (i = 0 ; i < request ; i++)
29 { 29 {
30 simple_a_set(obj, i); 30 simple_a_set(obj, i);
@@ -39,8 +39,8 @@ static void
39bench_eo_do_two_objs_growing_stack(int request) 39bench_eo_do_two_objs_growing_stack(int request)
40{ 40{
41 int i; 41 int i;
42 Eo *obj = efl_add(SIMPLE_CLASS, NULL); 42 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
43 Eo *obj2 = efl_add(SIMPLE_CLASS, NULL); 43 Eo *obj2 = efl_add_ref(SIMPLE_CLASS, NULL);
44 for (i = 0 ; i < request ; i++) 44 for (i = 0 ; i < request ; i++)
45 { 45 {
46 simple_other_call(obj, obj2, 20); 46 simple_other_call(obj, obj2, 20);
@@ -83,7 +83,7 @@ bench_eo_do_super(int request)
83 cur_klass = efl_class_new(&class_desc, SIMPLE_CLASS, NULL); 83 cur_klass = efl_class_new(&class_desc, SIMPLE_CLASS, NULL);
84 84
85 int i; 85 int i;
86 Eo *obj = efl_add(cur_klass, NULL); 86 Eo *obj = efl_add_ref(cur_klass, NULL);
87 for (i = 0 ; i < request ; i++) 87 for (i = 0 ; i < request ; i++)
88 { 88 {
89 simple_a_set(obj, i); 89 simple_a_set(obj, i);