ANN m_int gwi_class_end(const Gwi gwi) {
if(!gwi->gwion->env->class_def)
GWI_ERR_B("import: too many class_end called.")
- const Nspc nspc = gwi->gwion->env->class_def->nspc;
- if(nspc->info->class_data_size && !nspc->info->class_data)
- nspc->info->class_data = (m_bit*)xcalloc(1, nspc->info->class_data_size);
+ nspc_allocdata(gwi->gwion->env->class_def->nspc);
env_pop(gwi->gwion->env, 0);
return GW_OK;
}
m_str code_name_set(const m_str name, const m_str file) {
const size_t len = strlen(name) + strlen(file) + 2;
- const m_str str = (const m_str)xcalloc(1, len);
+ m_str str = (const m_str)xcalloc(1, len);
sprintf(str, "%s$%s", name, file);
return str;
}
const Vector v = info->args;
LOOP_OPTIM
for(m_uint i = vector_size(v) + 1; --i;)
- free((void*)vector_at(v, i - 1));
+ xfree((void*)vector_at(v, i - 1));
free_vector(mp, v);
}
mp_free(mp, ShredInfo, info); // ??? info->p