Skip to content

gh-154525: Fix curses getcchar() failure on ncurses older than 6.3#154526

Open
serhiy-storchaka wants to merge 2 commits into
python:mainfrom
serhiy-storchaka:curses-getcchar-ncurses-6.3
Open

gh-154525: Fix curses getcchar() failure on ncurses older than 6.3#154526
serhiy-storchaka wants to merge 2 commits into
python:mainfrom
serhiy-storchaka:curses-getcchar-ncurses-6.3

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jul 23, 2026

Copy link
Copy Markdown
Member

getcchar() rejected a non-NULL opts argument before ncurses 6.3 (patch 20210116). curses_getcchar() passes the color pair through opts, so on ncurses 6.1 and 6.2 every wide-character cell read failed with getcchar() returned ERR, breaking complexchar, in_wch(), getbkgrnd(), and (via gh-153395) headless test_curses.

Read the pair through the short slot on older ncurses. main-only -- the opts path and complexchar are 3.16-only.

getcchar() rejected a non-NULL opts argument before ncurses 6.3, so read
the color pair through the short slot instead.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
_NCURSES_GETCCHAR_EXTENDED_PAIR was referenced in only one place; move the
version condition and its comment to that call site.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant