Skip to content

u3: remove unnecessary refcount operations (losing u3_none)#828

Merged
pkova merged 1 commit into
developfrom
jb/no-lose-none
May 23, 2025
Merged

u3: remove unnecessary refcount operations (losing u3_none)#828
pkova merged 1 commit into
developfrom
jb/no-lose-none

Conversation

@joemfb

@joemfb joemfb commented May 22, 2025

Copy link
Copy Markdown
Collaborator

u3k() / u3a_gain() asserts that a noun reference is not u3_none, while u3z() / u3a_lose() does not. Neither needs -- they will both safely no-op given u3_none (due to the ..._is_normal() conditions inside their implementation functions). The inconsistency here makes for inconsistent code -- the presence of u3z(u3_none) may indicate misconceived refcount handling.

This PR does not resolve the overall issue. It just corrects a couple cases by removing unneeded refcount operations and notes another.

@joemfb joemfb requested a review from a team as a code owner May 22, 2025 18:52
@pkova pkova merged commit abe3a65 into develop May 23, 2025
2 checks passed
@pkova pkova deleted the jb/no-lose-none branch May 23, 2025 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants