diff --git a/src/control.c b/src/control.c index f54db25..6c282d0 100644 --- a/src/control.c +++ b/src/control.c @@ -1,9 +1,10 @@ #include "control.h" -static void telemetry_free(gpointer te, gpointer x) { +static void telemetry_free(gpointer _te, gpointer x) { + telemetry *te = (telemetry*) _te; UNUSED(x); g_array_free(te->objects, TRUE); - g_slice_free(telemetry, (telemetry*) te); + g_slice_free(telemetry, te); } static telemetry* telemetry_new() { @@ -14,14 +15,14 @@ static telemetry* telemetry_new() { trial *trial_new() { trial *t = g_slice_new0(trial); - g_queue_init(t->telemetry); + g_queue_init(&t->telemetry); t->map.solid_objects = g_array_new(FALSE, FALSE, sizeof(object)); return t; } void trial_reset_run(trial *t) { - g_queue_foreach(t->telemetry, telemetry_free, NULL); - g_queue_clear(t->telementry); + g_queue_foreach(&t->telemetry, telemetry_free, NULL); + g_queue_clear(&t->telemetry); t->last_ts = 0; } @@ -35,8 +36,8 @@ void trial_wait_for_input(trial *t) { } void trial_free(trial *t) { - g_queue_foreach(t->telemetry, telemetry_free, NULL); - g_queue_clear(t->telementry); + g_queue_foreach(&t->telemetry, telemetry_free, NULL); + g_queue_clear(&t->telemetry); g_array_free(t->map.solid_objects, TRUE); - g_slice_free(t); + g_slice_free(trial, t); } diff --git a/src/control.h b/src/control.h index 5971d87..e541ec8 100644 --- a/src/control.h +++ b/src/control.h @@ -1,6 +1,7 @@ #ifndef _CONTROL_H #define _CONTROL_H +#include #include #define INLINE static inline @@ -61,7 +62,7 @@ struct map { struct trial { map map; timestamp last_ts; - GQueue telemetry_data; + GQueue telemetry; vehicle vehicle; /* our view */ /* internal */ diff --git a/waf b/waf index 27ae690..2b2be97 100755 Binary files a/waf and b/waf differ diff --git a/wscript b/wscript index 651a295..af0823b 100644 --- a/wscript +++ b/wscript @@ -62,7 +62,7 @@ def PKGCONFIG(conf, name, uselib = None, define = '', version = '', mandatory = def set_options(opt): opt.tool_options('compiler_cc') - opt.tool_options('ragel', tdir = '.') + opt.tool_options('ragel', tooldir = '.') def configure(conf): conf.check_tool('compiler_cc')