aboutsummaryrefslogtreecommitdiffstats
path: root/src/benchmarks
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-09 15:47:28 +0000
committerTom Hacohen <tom@stosb.com>2016-03-09 16:09:14 +0000
commit4f949a2757b6332306264d7f126b15ba7bfd37d4 (patch)
treeec3a3aacfe34b2b3e75f3fc4d85531f6f4957c9d /src/benchmarks
parentEctor and eo suite: Semi automatically migrate to the new eo_add. (diff)
downloadefl-4f949a2757b6332306264d7f126b15ba7bfd37d4.tar.gz
Automatic migration to the new eo_add syntax.
Diffstat (limited to 'src/benchmarks')
-rw-r--r--src/benchmarks/eo/eo_bench_callbacks.c3
-rw-r--r--src/benchmarks/eo/eo_bench_eo_do.c18
2 files changed, 14 insertions, 7 deletions
diff --git a/src/benchmarks/eo/eo_bench_callbacks.c b/src/benchmarks/eo/eo_bench_callbacks.c
index ab779f8417..2114234411 100644
--- a/src/benchmarks/eo/eo_bench_callbacks.c
+++ b/src/benchmarks/eo/eo_bench_callbacks.c
@@ -17,7 +17,8 @@ static void
bench_eo_callbacks_add(int request)
{
int i;
- Eo *obj = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj = NULL;
+ eo_add(&obj, SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
diff --git a/src/benchmarks/eo/eo_bench_eo_do.c b/src/benchmarks/eo/eo_bench_eo_do.c
index 9f84535254..9160507c75 100644
--- a/src/benchmarks/eo/eo_bench_eo_do.c
+++ b/src/benchmarks/eo/eo_bench_eo_do.c
@@ -10,7 +10,8 @@ static void
bench_eo_do_simple(int request)
{
int i;
- Eo *obj = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj = NULL;
+ eo_add(&obj, SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
simple_a_set(obj, i);
@@ -23,8 +24,10 @@ 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 = NULL;
+ eo_add(&obj, SIMPLE_CLASS, NULL);
+ Eo *obj2 = NULL;
+ eo_add(&obj2, SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
simple_a_set(obj, i);
@@ -39,8 +42,10 @@ 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 = NULL;
+ eo_add(&obj, SIMPLE_CLASS, NULL);
+ Eo *obj2 = NULL;
+ eo_add(&obj2, SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
simple_other_call(obj, obj2, 20);
@@ -78,7 +83,8 @@ bench_eo_do_super(int request)
cur_klass = eo_class_new(&class_desc, SIMPLE_CLASS, NULL);
int i;
- Eo *obj = eo_add(cur_klass, NULL);
+ Eo *obj = NULL;
+ eo_add(&obj, cur_klass, NULL);
for (i = 0 ; i < request ; i++)
{
simple_a_set(obj, i);