Title: Cleaning up generating macros in `_cursesmodule.c` by picnixz · Pull Request #125354 · python/cpython · GitHub
Open Graph Title: Cleaning up generating macros in `_cursesmodule.c` by picnixz · Pull Request #125354 · python/cpython
X Title: Cleaning up generating macros in `_cursesmodule.c` by picnixz · Pull Request #125354 · python/cpython
Description: This is mostly a cosmetic but useful PR. Why? because it's for future maintenance. For now, all generated methods have the following signature (modulo the Py_UNUSED): static PyObject *NAME(PyCursesWindowObject *self, PyObject *Py_UNUSED(args)); and they are stored in PyCursesWindow_methods using (PyCFunction) casts. I'm not sure whether we want to keep an explicit cast here or not but since we are also fixing UBSan failures, I think this one would count as one. Instead of changing it now, I first suggest cleaning up the macros and then, once we also fixed Argument Clinic generation, we may then fix the UBSan failures here as well (or I can patch half of the Window's object methods since the other half is AC-generated). I don't see when we'll need to call a method directly using its implementation and not via thePyObject_Call* API so we can also patch the macros directly in this PR. @vstinner please tell me whether you want me to include the UBSan failure fix in this PR or not (for that reason, I will not put an issue number yet since I don't know whether it should be part of #123961 or #111178).
Open Graph Description: This is mostly a cosmetic but useful PR. Why? because it's for future maintenance. For now, all generated methods have the following signature (modulo the Py_UNUSED): static PyObject *NAME(PyCu...
X Description: This is mostly a cosmetic but useful PR. Why? because it's for future maintenance. For now, all generated methods have the following signature (modulo the Py_UNUSED): static PyObject *NAME(...
Opengraph URL: https://github.com/python/cpython/pull/125354
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:8a354b26-025b-8d3c-33c4-0eaccb56342a |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E90C:174DE2:10E0B5B:168F64C:6B065924 |
| html-safe-nonce | 7366f86bb138233ba5b9a05f7a187adb8835e3e366c70d92c01dce5dfac73376 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTBDOjE3NERFMjoxMEUwQjVCOjE2OEY2NEM6NkIwNjU5MjQiLCJ2aXNpdG9yX2lkIjoiMjEyNjcwNTk5ODE3Njg2ODY0NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9bee587c78ee0b428ea8392be91d50af69aa36f8948a4f7d9fd6ef9c7910304a |
| hovercard-subject-tag | pull_request:2120672064 |
| 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/125354/files |
| twitter:image | https://avatars.githubusercontent.com/u/10796600?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/10796600?s=400&v=4 |
| og:image:alt | This is mostly a cosmetic but useful PR. Why? because it's for future maintenance. For now, all generated methods have the following signature (modulo the Py_UNUSED): static PyObject *NAME(PyCu... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6324e6ac990fb6befbec840cc0e102a1071c339bfe8f9826bb12de2e3ba1d297 |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7f0aa75f4141d440c6110dc31af7ea7797abb6c4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width