Title: Implement Py_UNUSED() for Windows MSVC compiler · Issue #107249 · python/cpython · GitHub
Open Graph Title: Implement Py_UNUSED() for Windows MSVC compiler · Issue #107249 · python/cpython
X Title: Implement Py_UNUSED() for Windows MSVC compiler · Issue #107249 · python/cpython
Description: The Py_UNUSED() is not implemented for the Windows MSVC compiler. Example with this function included by Python.h: see #107239 (comment) static inline unsigned int PyUnicode_IS_READY(PyObject* Py_UNUSED(op)) { return 1; } Without my chan...
Open Graph Description: The Py_UNUSED() is not implemented for the Windows MSVC compiler. Example with this function included by Python.h: see #107239 (comment) static inline unsigned int PyUnicode_IS_READY(PyObject* Py_U...
X Description: The Py_UNUSED() is not implemented for the Windows MSVC compiler. Example with this function included by Python.h: see #107239 (comment) static inline unsigned int PyUnicode_IS_READY(PyObject* Py_U...
Opengraph URL: https://github.com/python/cpython/issues/107249
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Implement Py_UNUSED() for Windows MSVC compiler","articleBody":"The ``Py_UNUSED()`` is not implemented for the Windows MSVC compiler.\r\n\r\nExample with this function included by Python.h: see https://github.com/python/cpython/pull/107239#issuecomment-1649982534\r\n\r\n```\r\nstatic inline unsigned int\r\nPyUnicode_IS_READY(PyObject* Py_UNUSED(op))\r\n{ return 1; }\r\n```\r\n\r\nWithout my change, building a C program with ``cl /W4`` which just includes Python.h emits the warning:\r\n\r\n```\r\nInclude\\cpython/unicodeobject.h(199): warning C4100: '_unused_op': unreferenced formal parameter\r\n```\r\n\r\nWith my change, no warnings are emitted!\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-107250\n* gh-127907\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/vstinner","@type":"Person","name":"vstinner"},"datePublished":"2023-07-25T15:22:32Z","url":"https://github.com/python/cpython/issues/107249"}
| 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 | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:26975c7d-6add-0681-8c80-fc3dafcb820b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AFCA:2C4BED:43B59C6:55DFC13:6B022F12 |
| html-safe-nonce | 0503616242aec5a85d68e1c1dffba2f74e6d044e2879af90dee2baa98f0da5db |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRkNBOjJDNEJFRDo0M0I1OUM2OjU1REZDMTM6NkIwMjJGMTIiLCJ2aXNpdG9yX2lkIjoiNDAwNjEzNDQ5OTkxODU5OTg2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0c9e4ddd7cbee72af042b8f6d588da9121a436bf1bb782a61dd43afb799532c3 |
| hovercard-subject-tag | issue:1820586976 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/python/cpython/107249/issue_layout |
| twitter:image | https://opengraph.githubassets.com/134d2f314f6fc6c88cbc71a0d49c9e66d9d38ddc40722a7298afafffb252a0f8/python/cpython/issues/107249 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/134d2f314f6fc6c88cbc71a0d49c9e66d9d38ddc40722a7298afafffb252a0f8/python/cpython/issues/107249 |
| og:image:alt | The Py_UNUSED() is not implemented for the Windows MSVC compiler. Example with this function included by Python.h: see #107239 (comment) static inline unsigned int PyUnicode_IS_READY(PyObject* Py_U... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vstinner |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| 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 | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width