}
ANN m_bool gwi_run(const Gwion gwion, m_bool (*f)(const Gwi)) {
+ const m_str name = gwion->env->name;
struct loc_t_ loc = {};
OperCK oper = {};
struct Gwi_ gwi = { .gwion=gwion, .loc=&loc, .oper=&oper };
- return f(&gwi);
+ const m_bool ret = f(&gwi);
+ gwion->env->name = name;
+ return ret;
}
const Map map = &gwion->data->plug;
for(m_uint i = 0; i < map_size(map); ++i) {
const Plug plug = (Plug)VVAL(map, i);
- if(plug->imp)
- return GW_OK;
const m_str name = (m_str)VKEY(map, i);
if(!strcmp(name, iname)) {
+ if(plug->imp)
+ return GW_OK;
const plugin imp = DLSYM(plug->dl, plugin, GWIMPORT_NAME);
if(!imp)
break;