FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-154525: Fix curses getcchar() failure on ncurses older than 6.3 by serhiy-storchaka · Pull Request #154526 · python/cpython · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
4 changes: 3 additions & 1 deletion Modules/_cursesmodule.c
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
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,9 @@ curses_getcchar(const cchar_t *wcval, wchar_t *wstr, attr_t *attrs, int *pair)
/* getcchar() is not guaranteed to write the text of an empty cell, so make
the output an empty string by default. */
wstr[0] = L'\0';
#if _NCURSES_EXTENDED_COLOR_FUNCS
/* getcchar()'s opts slot returns the extended color pair, but ncurses
returned ERR for a non-NULL opts until 6.3 (patch 20210116). */
#if _NCURSES_EXTENDED_COLOR_FUNCS && NCURSES_VERSION_PATCH+0 >= 20210116
int rtn = getcchar(wcval, wstr, attrs, &spair, pair);
#else
int rtn = getcchar(wcval, wstr, attrs, &spair, NULL);
Expand Down
Loading

Back | FazBrowse Home | New Git URL