gh-154788: Make curses window.getparent() unconditional - #154789
Open
fedonman wants to merge 1 commit into
Open
Conversation
getparent() calls no curses function, it returns the window's stored parent, but it was compiled only when the ncurses extension functions were present. Close the guard after getscrreg(), which does need it. The test moves out of test_state_getters, which is gated on is_scrollok(), so that getparent() is covered on backends without the extensions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
window.getparent()calls no curses function: it returns the window's stored parent. It wascompiled only when the ncurses extension functions were present, so it was missing on
backends without them, although the documentation lists no availability requirement for it.
The guard now closes after
getscrreg(), which does need it.The test moves out of
test_state_getters, which is gated onis_scrollok(), so thatgetparent()is covered on backends without the extensions.Compiling the extensions-absent configuration is not possible here, since the ncurses header
defines
NCURSES_EXT_FUNCS, so that side rests on reading the code.getparent()is new in3.16, so there is no NEWS entry.