Title: code.h uses MS-only C++ extensions · Issue #101907 · python/cpython · GitHub
Open Graph Title: code.h uses MS-only C++ extensions · Issue #101907 · python/cpython
X Title: code.h uses MS-only C++ extensions · Issue #101907 · python/cpython
Description: Issue #100222 added a struct to Include/cpython/code.h (which is included by default by Python.h) that is not compliant C++: typedef union { uint16_t cache; struct { uint8_t opcode; uint8_t oparg; }; } _Py_CODEUNIT; The struct member req...
Open Graph Description: Issue #100222 added a struct to Include/cpython/code.h (which is included by default by Python.h) that is not compliant C++: typedef union { uint16_t cache; struct { uint8_t opcode; uint8_t oparg; ...
X Description: Issue #100222 added a struct to Include/cpython/code.h (which is included by default by Python.h) that is not compliant C++: typedef union { uint16_t cache; struct { uint8_t opcode; uint8_t oparg; ...
Opengraph URL: https://github.com/python/cpython/issues/101907
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"code.h uses MS-only C++ extensions","articleBody":"Issue #100222 added a struct to `Include/cpython/code.h` (which is included by default by `Python.h`) that is not compliant C++:\r\n\r\n```\r\ntypedef union {\r\n uint16_t cache;\r\n struct {\r\n uint8_t opcode;\r\n uint8_t oparg;\r\n };\r\n} _Py_CODEUNIT;\r\n```\r\n\r\nThe struct member requires a name, as only anonymous structs are currently permitted in standard C++.\r\n\r\n(And since the original issue invokes PEP 7, I'll do the same and point out that \"The public C API should be compatible with C++\". The intention of this clause is that standard C++ can `#include \u003cPython.h\u003e`, which is currently broken.)\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-101909\n* gh-101912\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/zooba","@type":"Person","name":"zooba"},"datePublished":"2023-02-14T15:38:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/101907/cpython/issues/101907"}
| 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:a2f25a3a-6a99-58c5-3d0c-50d6fe0510a5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A31E:1FC3E6:404F55:5AB755:696A0B39 |
| html-safe-nonce | 9ecf01e0beb885e14fa46399c761f3a78cfd458e7fab5a71e9c240da3e21a4e3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzFFOjFGQzNFNjo0MDRGNTU6NUFCNzU1OjY5NkEwQjM5IiwidmlzaXRvcl9pZCI6IjgxOTkxMjYyNzI0NDA5MjkwODEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 270a2ad969a523f33f94da0d5c8ba0585b124d6447963f1f68de3e1b6c810204 |
| hovercard-subject-tag | issue:1584384632 |
| 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/101907/issue_layout |
| twitter:image | https://opengraph.githubassets.com/74e91f5befe3a4f68835d4116f30849acae782c6875f7dab496c48b2282dcc68/python/cpython/issues/101907 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/74e91f5befe3a4f68835d4116f30849acae782c6875f7dab496c48b2282dcc68/python/cpython/issues/101907 |
| og:image:alt | Issue #100222 added a struct to Include/cpython/code.h (which is included by default by Python.h) that is not compliant C++: typedef union { uint16_t cache; struct { uint8_t opcode; uint8_t oparg; ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | zooba |
| hostname | github.com |
| expected-hostname | github.com |
| None | 699227a00bbb7fe1eec276d2ae1c3a93068bc5ba483bd9dc4b2a27a8f4f2f595 |
| 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 | 7266b2d935baa1c6474b16dd9feaa5ca30607261 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width