- private_mconsole_t *this = malloc_thing(private_mconsole_t);
-
- this->public.add_iface = (bool(*)(mconsole_t*, char *guest, char *host))add_iface;
- this->public.del_iface = (bool(*)(mconsole_t*, char *guest))del_iface;
- this->public.exec = (int(*)(mconsole_t*, void(*cb)(void*,char*,size_t), void *data, char *cmd))exec;
- this->public.destroy = (void*)destroy;
-
- this->idle = idle;
+ private_mconsole_t *this;
+
+ INIT(this,
+ .public = {
+ .add_iface = _add_iface,
+ .del_iface = _del_iface,
+ .exec = _exec,
+ .destroy = _destroy,
+ },
+ .idle = idle,
+ );