errno = EINVAL;
goto fail;
}
- if (!ec_pnode_has_child(p)) {
- errno = EINVAL;
- goto fail;
- }
return p;
if (out->htable == NULL)
goto fail;
- root = ec_pnode_get_root(pstate);
+ root = EC_PNODE_GET_ROOT(pstate);
if (ec_htable_set(out->htable, &root, sizeof(root), NULL, NULL) < 0)
goto fail;
(void *)iter, "id_arg", 0);
}
- res = eval_func(ec_strvec_val(ec_pnode_strvec(func_name), 0),
+ res = eval_func(ec_strvec_val(ec_pnode_get_strvec(func_name), 0),
pstate, args, n_arg);
args = NULL;
return res;
if (res == NULL)
goto fail;
res->type = STR;
- res->str = ec_strdup(ec_strvec_val(ec_pnode_strvec(value), 0));
+ res->str = ec_strdup(ec_strvec_val(ec_pnode_get_strvec(value), 0));
if (res->str == NULL)
goto fail;
return res;
if (res == NULL)
goto fail;
res->type = INT;
- if (ec_str_parse_llint(ec_strvec_val(ec_pnode_strvec(value), 0),
+ if (ec_str_parse_llint(ec_strvec_val(ec_pnode_get_strvec(value), 0),
0, LLONG_MIN, LLONG_MAX,
&res->int64) < 0)
goto fail;
if (valid == 0) {
child = ec_pnode_get_last_child(pstate);
- ec_pnode_unlink_child(pstate, child);
+ ec_pnode_unlink_child(child);
ec_pnode_free(child);
return EC_PARSE_NOMATCH;
}