Improvements:
* Allocate once and reuse Evas_Map.
* Make edje_cc faster by improving the parser, mapping file in memory and using threads.
+ * Made state index optional in EDC files and Embryo scripts.
Fixes:
* Add missing files in the tarballs.
parent = parent_desc;
if (!parent)
{
- check_arg_count(2);
+ check_min_arg_count(1);
/* inherit may not be used in the default description */
if (!ep->other.desc_count)
/* find the description that we inherit from */
parent_name = parse_str(0);
- parent_val = parse_float_range(1, 0.0, 1.0);
+ if (get_arg_count() == 2)
+ parent_val = parse_float_range(1, 0.0, 1.0);
+ else
+ parent_val = 0.0;
if (!strcmp (parent_name, "default") && parent_val == 0.0)
parent = ep->default_desc;
Edje_Part_Description_Common *ed;
char *s;
- check_arg_count(2);
+ check_min_arg_count(1);
ep = current_part;
}
ed->state.name = s;
- ed->state.value = parse_float_range(1, 0.0, 1.0);
+ if (get_arg_count() == 1)
+ ed->state.value = 0.0;
+ else
+ ed->state.value = parse_float_range(1, 0.0, 1.0);
if (ed != ep->default_desc)
{
if (ep->action == EDJE_ACTION_TYPE_STATE_SET)
{
ep->state = parse_str(1);
- ep->value = parse_float_range(2, 0.0, 1.0);
+ if (get_arg_count() == 1)
+ ep->value = 0.0;
+ else
+ ep->value = parse_float_range(2, 0.0, 1.0);
}
else if (ep->action == EDJE_ACTION_TYPE_SIGNAL_EMIT)
{
double value = 0.0;
Edje_Real_Part *rp;
- CHKPARAM(3);
+ if (!HASNPARAMS(2) || !HASNPARAMS(3)) return -1;
ed = embryo_program_data_get(ep);
GETSTR(state, params[2]);
if ((!state)) return 0;
part_id = params[1];
if (part_id < 0) return 0;
- f = EMBRYO_CELL_TO_FLOAT(params[3]);
- value = (double)f;
+ if (HASNPARAMS(3))
+ {
+ f = EMBRYO_CELL_TO_FLOAT(params[3]);
+ value = (double)f;
+ }
+ else
+ value = 0.0;
rp = ed->table_parts[part_id % ed->table_parts_size];
if (rp)
{
void _edje_embryo_globals_init(Edje *ed);
#define CHKPARAM(n) if (params[0] != (sizeof(Embryo_Cell) * (n))) return -1;
+#define HASNPARAMS(n) (params[0] == (sizeof(Embryo_Cell) * (n)))
#define GETSTR(str, par) { \
Embryo_Cell *___cptr; \
int ___l; \