ui/common/context.c

changeset 75
73c8a3780c72
parent 69
d8991e166f2a
child 77
5de33c2d94c6
equal deleted inserted replaced
74:4466ebbd9fd5 75:73c8a3780c72
199 var->type = type; 199 var->type = type;
200 var->value = uic_create_value(ctx, type); 200 var->value = uic_create_value(ctx, type);
201 var->from = NULL; 201 var->from = NULL;
202 var->from_ctx = ctx; 202 var->from_ctx = ctx;
203 203
204 cxMempoolRegister(ctx->mp, var, (cx_destructor_func)uic_unbind_var); 204 cxMempoolSetDestructor(var, (cx_destructor_func)uic_unbind_var);
205 205
206 if(!ctx->vars_unbound) { 206 if(!ctx->vars_unbound) {
207 ctx->vars_unbound = cxHashMapCreate(ctx->allocator, CX_STORE_POINTERS, 16); 207 ctx->vars_unbound = cxHashMapCreate(ctx->allocator, CX_STORE_POINTERS, 16);
208 } 208 }
209 cxMapPut(ctx->vars_unbound, name, var); 209 cxMapPut(ctx->vars_unbound, name, var);

mercurial