aboutsummaryrefslogtreecommitdiffstats
path: root/src/benchmarks
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-11 12:24:08 +0000
committerTom Hacohen <tom@stosb.com>2016-03-11 12:29:03 +0000
commitf24210caac8d50940ddef858994571be59179c10 (patch)
treecfc8b264e77abbab9827517d1827f9a4fb4dcd50 /src/benchmarks
parentRevert "Examples: Update according to recent eo_add changes." (diff)
downloadefl-f24210caac8d50940ddef858994571be59179c10.tar.gz
Revert "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, 7 insertions, 14 deletions
diff --git a/src/benchmarks/eo/eo_bench_callbacks.c b/src/benchmarks/eo/eo_bench_callbacks.c
index 2114234411..ab779f8417 100644
--- a/src/benchmarks/eo/eo_bench_callbacks.c
+++ b/src/benchmarks/eo/eo_bench_callbacks.c
@@ -17,8 +17,7 @@ static void
bench_eo_callbacks_add(int request)
{
int i;
- Eo *obj = NULL;
- eo_add(&obj, SIMPLE_CLASS, NULL);
+ Eo *obj = eo_add(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 9160507c75..9f84535254 100644
--- a/src/benchmarks/eo/eo_bench_eo_do.c
+++ b/src/benchmarks/eo/eo_bench_eo_do.c
@@ -10,8 +10,7 @@ static void
bench_eo_do_simple(int request)
{
int i;
- Eo *obj = NULL;
- eo_add(&obj, SIMPLE_CLASS, NULL);
+ Eo *obj = eo_add(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
simple_a_set(obj, i);
@@ -24,10 +23,8 @@ static void
bench_eo_do_two_objs(int request)
{
int i;
- Eo *obj = NULL;
- eo_add(&obj, SIMPLE_CLASS, NULL);
- Eo *obj2 = NULL;
- eo_add(&obj2, SIMPLE_CLASS, NULL);
+ Eo *obj = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj2 = eo_add(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
simple_a_set(obj, i);
@@ -42,10 +39,8 @@ static void
bench_eo_do_two_objs_growing_stack(int request)
{
int i;
- Eo *obj = NULL;
- eo_add(&obj, SIMPLE_CLASS, NULL);
- Eo *obj2 = NULL;
- eo_add(&obj2, SIMPLE_CLASS, NULL);
+ Eo *obj = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj2 = eo_add(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
simple_other_call(obj, obj2, 20);
@@ -83,8 +78,7 @@ bench_eo_do_super(int request)
cur_klass = eo_class_new(&class_desc, SIMPLE_CLASS, NULL);
int i;
- Eo *obj = NULL;
- eo_add(&obj, cur_klass, NULL);
+ Eo *obj = eo_add(cur_klass, NULL);
for (i = 0 ; i < request ; i++)
{
simple_a_set(obj, i);