Title: Wrong size of c_ulong/c_ulonglong in Linux · Issue #108907 · python/cpython · GitHub
Open Graph Title: Wrong size of c_ulong/c_ulonglong in Linux · Issue #108907 · python/cpython
X Title: Wrong size of c_ulong/c_ulonglong in Linux · Issue #108907 · python/cpython
Description: Bug report Bug description: Attribute _type_ of c_ulong returns L, which is correct following the format characters documentation; however, the documentation says it has 4 bytes size, but sizeof(c_ulong) returns 8 bytes. >>> sizeof(c_ulo...
Open Graph Description: Bug report Bug description: Attribute _type_ of c_ulong returns L, which is correct following the format characters documentation; however, the documentation says it has 4 bytes size, but sizeof(c_...
X Description: Bug report Bug description: Attribute _type_ of c_ulong returns L, which is correct following the format characters documentation; however, the documentation says it has 4 bytes size, but sizeof(c_...
Opengraph URL: https://github.com/python/cpython/issues/108907
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Wrong size of c_ulong/c_ulonglong in Linux","articleBody":"# Bug report\n\n### Bug description:\n\nAttribute ```_type_``` of ```c_ulong``` returns ```L```, which is correct following the [format characters documentation](https://docs.python.org/3.8/library/struct.html#format-characters); however, the documentation says it has 4 bytes size, but ```sizeof(c_ulong)``` returns 8 bytes. \n```python\n\u003e\u003e\u003e sizeof(c_ulong)\n8\n\u003e\u003e\u003e c_ulong._type_\n'L'\n```\nAlso ```c_ulonglong``` is automatically casted to ```c_ulong```:\n```python\nt5=c_ulonglong(200000000000000000000000000000000000)\n\u003e\u003e\u003e type(t5)\n\u003cclass 'ctypes.c_ulong'\u003e\n```\n, thus if ```c_ulong``` will have 4 bytes, will be there available a type of 8 bytes size? \n\n\n### CPython versions tested on:\n\n3.8\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-145837\n* gh-146328\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/dudekw","@type":"Person","name":"dudekw"},"datePublished":"2023-09-05T11:42:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/108907/cpython/issues/108907"}
| 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:0d302fab-01be-07e1-f150-1c0f4f1f3edf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A39E:93CC4:1BB10D7:275ACF5:6A50D74B |
| html-safe-nonce | e6d807301298a982a2889740216c3420322615764570a075406b8c29be93a552 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzlFOjkzQ0M0OjFCQjEwRDc6Mjc1QUNGNTo2QTUwRDc0QiIsInZpc2l0b3JfaWQiOiI3NjA3ODgxMzE4MTc1MTA3MzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2e50f20118f80e6cc824145f8ad39683cab9e71577b7d1231cafad2a9472cb81 |
| hovercard-subject-tag | issue:1881803605 |
| 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/108907/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c3ac8960bb0b92c91c269bd10f10c242b8e9eace5bc2f610af7a7055279c4ef5/python/cpython/issues/108907 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c3ac8960bb0b92c91c269bd10f10c242b8e9eace5bc2f610af7a7055279c4ef5/python/cpython/issues/108907 |
| og:image:alt | Bug report Bug description: Attribute _type_ of c_ulong returns L, which is correct following the format characters documentation; however, the documentation says it has 4 bytes size, but sizeof(c_... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dudekw |
| hostname | github.com |
| expected-hostname | github.com |
| None | 72b13e0e8d0319acdd27a145cfe73f4f06c791713d0ac4690e41fb68ad28cac0 |
| 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 | 73ad5c4eaffed7bb3637024653eabdbca84a855e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width