On 12.08.23 14:05, Julien Grall wrote:
Hi,

On 24/07/2023 12:02, Juergen Gross wrote:
Add a variant of get_node() returning a const struct node pointer.

Note that all callers of this new variant don't supply a pointer where
to store the canonical node name, while all callers needing a non-const
node do supply this pointer. This results in an asymmetric
simplification of the two variants.

And I am guessing there are no near term plan to use get_node() with canonical_name = NULL or the caller of get_node_const() expecting the name?

Correct.

The canonical name is needed by the caller only in case he wants to store
the node afterwards. And this will be done only after a modification of
the node, implying that using the "const" variant would be wrong.


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to