#ifndef __GWION_CLOSURE
#define __GWION_CLOSURE
-ANN m_bool tmpl_fptr(const Env env, const Fptr_Def fptr, const Func_Def fdef);
+ANN bool tmpl_fptr(const Env env, const Fptr_Def fptr, const Func_Def fdef);
#endif
*(VM_Code*)o->data = ((Func)vector_at(&o->type_ref->nspc->vtable, 1))->code;
}
-ANN m_bool tmpl_fptr(const Env env, const Fptr_Def fptr, const Func_Def fdef) {
+ANN bool tmpl_fptr(const Env env, const Fptr_Def fptr, const Func_Def fdef) {
fptr->cdef->base.type->nspc->offset += SZ_INT * 3;
env_push_type(env, fptr->cdef->base.type);
- CHECK_BB(traverse_func_def(env, fdef));
+ CHECK_B(traverse_func_def(env, fdef));
builtin_func(env->gwion, fdef->base->func, fptr_ctor);
set_tflag(fdef->base->func->value_ref->type, tflag_ftmpl);
env_pop(env, 0);
- return GW_OK;
+ return true;
}
static DTOR(fptr_dtor) {
const m_bool ret = scan2_class_def(env, fptr->cdef);
const Func_Def fdef = mp_vector_at(fptr->cdef->base.type->info->cdef->body, struct Section_ , 0)->d.func_def;
if(fdef->base->func) set_fflag(fdef->base->func, fflag_fptr);
- else CHECK_BB(tmpl_fptr(env, fptr, fdef));
+ else CHECK_b(tmpl_fptr(env, fptr, fdef));
if(GET_FLAG(fptr->cdef, global)) env_pop(env, 0);
return ret;
}