Skip to content

libexpr: Remove non-const overload of listElems (backport #13360)#13633

Merged
mergify[bot] merged 1 commit into2.29-maintenancefrom
mergify/bp/2.29-maintenance/pr-13360
Jul 31, 2025
Merged

libexpr: Remove non-const overload of listElems (backport #13360)#13633
mergify[bot] merged 1 commit into2.29-maintenancefrom
mergify/bp/2.29-maintenance/pr-13360

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Jul 30, 2025

Motivation

This overload isn't actually necessary anywhere and doesn't make much sense. The pointers to Values are themselves const, but the Values are mutable.
A non-const member function implies that the object itself can be modified but this doesn't make much sense considering the return type: Value * const * , which is a pointer to a constant array of pointers to mutable values.

cc @roberth, @edolstra as you've been cleaning up the meaning of const throughout the codebase.

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.


This is an automatic backport of pull request #13360 done by [Mergify](https://mergify.com).

This overload isn't actually necessary anywhere and
doesn't make much sense. The pointers to `Value`s are
themselves const, but the `Value`s are mutable.
A non-const member function implies that the object itself
can be modified but this doesn't make much sense considering
the return type: `Value * const * `, which is a pointer
to a constant array of pointers to mutable values.

(cherry picked from commit 7b46eb9)
@mergify mergify bot added automatic backport This PR is a backport produced by automation (does not trigger backporting) merge-queue labels Jul 30, 2025
@mergify mergify bot requested a review from edolstra as a code owner July 30, 2025 12:54
@mergify mergify bot added merge-queue automatic backport This PR is a backport produced by automation (does not trigger backporting) labels Jul 30, 2025
mergify bot added a commit that referenced this pull request Jul 30, 2025
mergify bot added a commit that referenced this pull request Jul 30, 2025
mergify bot added a commit that referenced this pull request Jul 30, 2025
mergify bot added a commit that referenced this pull request Jul 30, 2025
@mergify mergify bot merged commit b0169fd into 2.29-maintenance Jul 31, 2025
27 checks passed
@mergify mergify bot deleted the mergify/bp/2.29-maintenance/pr-13360 branch July 31, 2025 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automatic backport This PR is a backport produced by automation (does not trigger backporting) merge-queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant