Title: bpo-25720: curses: Fix check for whether WINDOW is a pad by ma8ma · Pull Request #1689 · python/cpython · GitHub
Open Graph Title: bpo-25720: curses: Fix check for whether WINDOW is a pad by ma8ma · Pull Request #1689 · python/cpython
X Title: bpo-25720: curses: Fix check for whether WINDOW is a pad by ma8ma · Pull Request #1689 · python/cpython
Description: Highlights of change Add configure check for whether have is_pad function/macro. Define py_is_pad macro if HAVE_CURSES_IS_PAD or WINDOW_HAS_FLAGS are defined. Change conditional compilation: replace WINDOW_HAS_FLAGS with py_is_pad Remove the code that defines always WINDOW_HAS_FLAGS when having ncurses.h. Set WINDOW to non-opaque type if both HAVE_CURSES_IS_PAD and WINDOW_HAS_FLAGS aren't defined when having ncurses.h. Motivation WINDOW_HAS_FLAGS will be defined by the configure check, but if the platform has ncurses.h, defines the macro always. Therefore, codes that check directly the field of WINDOW are enabled regardless of NCURSES_OPAQUE (since ncurses 5.7), and a platform that WINDOW is actually opaque occurs compile error at that place. For this reason, the codes are modified to use py_is_pad macro to check WINDOW state. Note that if ncurses doesn't have both is_pad function (since 5.8) and _flags field of WINDOW, there is no method to check whether WINDOW is a pad. In this case, NCURSES_OPAQUE is defined as zero to make WINDOW to non-opaque type before including ncurses.h. https://bugs.python.org/issue25720
Open Graph Description: Highlights of change Add configure check for whether have is_pad function/macro. Define py_is_pad macro if HAVE_CURSES_IS_PAD or WINDOW_HAS_FLAGS are defined. Change conditional compilation: repla...
X Description: Highlights of change Add configure check for whether have is_pad function/macro. Define py_is_pad macro if HAVE_CURSES_IS_PAD or WINDOW_HAS_FLAGS are defined. Change conditional compilation: repla...
Opengraph URL: https://github.com/python/cpython/pull/1689
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:a7c5f91a-be50-9503-7e18-406d861823fd |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8F96:14011B:31A1198:45A6C0D:6A4F766D |
| html-safe-nonce | 1395a80a8c0aa0068bf89ed42995c363fb43ba2c5097e00d4398a2976ad6cc5a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Rjk2OjE0MDExQjozMUExMTk4OjQ1QTZDMEQ6NkE0Rjc2NkQiLCJ2aXNpdG9yX2lkIjoiMTUxMjE2NzY1NDk1MzAyMzA4NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2d82b8a95da697718b23422e38955f093219944a612e49e3e2d78b66d7597b1e |
| hovercard-subject-tag | pull_request:121646563 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/1689/files |
| twitter:image | https://avatars.githubusercontent.com/u/15698961?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/15698961?s=400&v=4 |
| og:image:alt | Highlights of change Add configure check for whether have is_pad function/macro. Define py_is_pad macro if HAVE_CURSES_IS_PAD or WINDOW_HAS_FLAGS are defined. Change conditional compilation: repla... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4b249b445842943ed31549e027f57a8ade9881ed |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width