- for (enum pivot_axis_type pc_a = 0; ; pc_a++)
- {
- assert (pc_a < PIVOT_N_AXES);
- for (size_t pc_a_idx = 0; pc_a_idx < s->nests[pc_a]->n; pc_a_idx++)
- {
- const struct ctables_cell_value *cv = &cell->axes[pc_a].cvs[pc_a_idx];
- if (cv->category->type == CCT_POSTCOMPUTE)
- {
- if (pc_a_p)
- *pc_a_p = pc_a;
- if (pc_a_idx_p)
- *pc_a_idx_p = pc_a_idx;
- return cv->category->pc;
- }
- }
- }
+ const struct ctables_postcompute *pc = NULL;
+ for (enum pivot_axis_type pc_a = 0; pc_a < PIVOT_N_AXES; pc_a++)
+ for (size_t pc_a_idx = 0; pc_a_idx < s->nests[pc_a]->n; pc_a_idx++)
+ {
+ const struct ctables_cell_value *cv = &cell->axes[pc_a].cvs[pc_a_idx];
+ if (cv->category->type == CCT_POSTCOMPUTE)
+ {
+ if (pc)
+ {
+ /* Multiple postcomputes cross each other. The value is
+ undefined. */
+ return NULL;
+ }