Hi all,
*SVN 2025* changes the parameters of eval_B(), eval_AB(), eval_XB(),
eval_AXB(), eval_LB(), eval_ALB(), eval_LXB(), eval_ALXB(), eval_LRXB(),
eval_ALRXB(), eval_fill_B(), eval_fill_AB(), and a number of
implementation helpers (do_CR*, do_eval_B, disclose, partition, pick,
transpose, …) to "const cValue &" (typedef'd as *cValue_R*).
The top-level eval_XXX() functions previously took *Value_P* (a
reference-counted smart pointer), so every call incremented the
reference count on entry and decremented it on return. The helpers
previously took "const cValue *". Both are now "const cValue &": the
caller retains ownership through its *Value_P* and the callee receives a
plain reference with no reference-count overhead. As a side effect,
accidental pointer arithmetic (e.g. ++ / --) becomes a compile-time
error and the non-null contract is expressed in the type. Parameters
that legitimately accept a *null* (optional axes, optional bounds in ⌹,
indexed assignment) are left as "const cValue *".
Note: this commit touches roughly 90 files. "svn update" will show a
large diff — that is expected.
Callers that previously passed *Value_P::get() *now pass **val_p*
(operator*); functions that previously wrote *X->* now write *X.*.
Three rebinding sites (RANK, INNER, MAP) introduce a local "const cValue
* pA/pB" shadow for re-pointing after the initial check.
Best Regards,
Jürgen
PS. Prepared with Claude Code (claude.ai/code), SVN r2025:
https://svn.savannah.gnu.org/viewvc/apl?view=revision&revision=2025. I
wanted to make this change for a long time but was unable to do so
manually because far too many files and Value_P instances were involved.