Skip to content

gh-158078: Fix building curses with narrow ncurses - #158088

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-term-attrs-narrow
Sep 27, 2026
Merged

serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-term-attrs-narrow

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Detect curses functions with a link check instead of a compile check, since the header can declare a function that the library lacks, for example term_attrs() in the narrow ncurses library.

Also fix two tests that failed on the narrow build: narrow ncurses inserts a NUL as ^@, and slk_set() only supports single-byte characters.

🤖 Generated with Claude Code

Detect curses functions with a link check instead of a compile check,
since the header can declare a function that the library lacks, for
example term_attrs() in the narrow ncurses library.

Fix test_curses on the narrow build.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Deepfriedice

Copy link
Copy Markdown

I've tried compiling this using a local copy of NCurses which was compiled with --disable-widec, and it produces a working executable.

@serhiy-storchaka
serhiy-storchaka merged commit 4abf0d4 into python:main Sep 27, 2026
57 checks passed
@serhiy-storchaka
serhiy-storchaka deleted the curses-term-attrs-narrow branch September 27, 2026 16:03
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.

2 participants