return bc_vec_item(v, ptr->idx);
}
+// 'num' need not be initialized on entry
static BC_STATUS zbc_program_num(BcResult *r, BcNum **num, bool hex)
{
switch (r->t) {
hex = hex && len == 1;
base_t = hex ? 16 : G.prog.ib_t;
s = zbc_num_parse(&r->d.n, str, base_t);
-
if (s) {
bc_num_free(&r->d.n);
RETURN_STATUS(s);
}
-
*num = &r->d.n;
r->t = BC_RESULT_TEMP;
break;
RETURN_STATUS(bc_error_stack_has_too_few_elements());
r = bc_vec_item_rev(&G.prog.results, idx);
- num = NULL; // is this NULL necessary?
s = zbc_program_num(r, &num, false);
if (s) RETURN_STATUS(s);
RETURN_STATUS(bc_error_stack_has_too_few_elements());
r = bc_vec_top(&G.prog.results);
- num = NULL; // TODO: is this NULL needed?
s = zbc_program_num(r, &num, false);
if (s) RETURN_STATUS(s);
RETURN_STATUS(bc_error_stack_has_too_few_elements());
r = bc_vec_top(&G.prog.results);
- n = NULL; // is this needed?
s = zbc_program_num(r, &n, false);
if (s) RETURN_STATUS(s);