185 CxHashKey key = cx_hash_key(name, strlen(name)); |
185 CxHashKey key = cx_hash_key(name, strlen(name)); |
186 return ctx_getvar(ctx, key); |
186 return ctx_getvar(ctx, key); |
187 } |
187 } |
188 |
188 |
189 UiVar* uic_create_var(UiContext *ctx, const char *name, UiVarType type) { |
189 UiVar* uic_create_var(UiContext *ctx, const char *name, UiVarType type) { |
|
190 if(ctx->vars_unbound) { |
|
191 UiVar *unbound = cxMapGet(ctx->vars_unbound, name); |
|
192 if(unbound) { |
|
193 return unbound; |
|
194 } |
|
195 } |
|
196 |
190 UiVar *var = uic_get_var(ctx, name); |
197 UiVar *var = uic_get_var(ctx, name); |
191 if(var) { |
198 if(var) { |
192 if(var->type == type) { |
199 if(var->type == type) { |
193 return var; |
200 return var; |
194 } else { |
201 } else { |