Title: Provide PyLong conversions with Py_(u)intptr_t · Issue #110863 · python/cpython · GitHub
Open Graph Title: Provide PyLong conversions with Py_(u)intptr_t · Issue #110863 · python/cpython
X Title: Provide PyLong conversions with Py_(u)intptr_t · Issue #110863 · python/cpython
Description: Feature or enhancement Proposal: The following C API functions would be nice to have and probably easy to provide. PyAPI_FUNC(PyObject *) PyLong_FromIntptr_t(Py_intptr_t); PyAPI_FUNC(PyObject *) PyLong_FromUintptr_t(Py_uintptr_t); PyAPI_...
Open Graph Description: Feature or enhancement Proposal: The following C API functions would be nice to have and probably easy to provide. PyAPI_FUNC(PyObject *) PyLong_FromIntptr_t(Py_intptr_t); PyAPI_FUNC(PyObject *) Py...
X Description: Feature or enhancement Proposal: The following C API functions would be nice to have and probably easy to provide. PyAPI_FUNC(PyObject *) PyLong_FromIntptr_t(Py_intptr_t); PyAPI_FUNC(PyObject *) Py...
Opengraph URL: https://github.com/python/cpython/issues/110863
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Provide PyLong conversions with Py_(u)intptr_t","articleBody":"# Feature or enhancement\n\n### Proposal:\n\nThe following C API functions would be nice to have and probably easy to provide.\n```c\nPyAPI_FUNC(PyObject *) PyLong_FromIntptr_t(Py_intptr_t);\nPyAPI_FUNC(PyObject *) PyLong_FromUintptr_t(Py_uintptr_t);\n\nPyAPI_FUNC(Py_intptr_t) PyLong_AsInptr_t(PyObject *);\nPyAPI_FUNC(Py_uintptr_t) PyLong_AsUinptr_t(PyObject *);\n```\n\nNote that the given integers types should exist, as they have official counterparts [in C99](https://en.cppreference.com/w/c/types/integer).\n\n### Has this already been discussed elsewhere?\n\nThis is a minor feature, which does not need previous discussion elsewhere\n\n### Links to previous discussion of this feature:\n\nThere is a discussion of a similar feature in https://github.com/python/cpython/issues/62070, but I would argue that `intptr_t` and `uintptr_t` are much more common in real life that `intmax_t`.","author":{"url":"https://github.com/pitrou","@type":"Person","name":"pitrou"},"datePublished":"2023-10-14T07:44:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/110863/cpython/issues/110863"}
| 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:711867d7-74c5-5799-e6f1-902608f22242 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B970:9445B:2BAE5E4:3AFBA1F:696AEBB4 |
| html-safe-nonce | 29268db5e0089654d5c1d1f63ef46afa95e9671f30548426107cb904a95df6ec |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTcwOjk0NDVCOjJCQUU1RTQ6M0FGQkExRjo2OTZBRUJCNCIsInZpc2l0b3JfaWQiOiI2NTIxNzAwNTkxMzkyNzEzNjUyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 27031a1ad790b0c2b10c50cb2eda0acee83440d4b8f2cc60ead87a988f52b266 |
| hovercard-subject-tag | issue:1943065619 |
| 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/110863/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4b8f20b369b986d44e8c31e7f1ae47f2574c3a49041cd7343b84d2a2356c9a9e/python/cpython/issues/110863 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4b8f20b369b986d44e8c31e7f1ae47f2574c3a49041cd7343b84d2a2356c9a9e/python/cpython/issues/110863 |
| og:image:alt | Feature or enhancement Proposal: The following C API functions would be nice to have and probably easy to provide. PyAPI_FUNC(PyObject *) PyLong_FromIntptr_t(Py_intptr_t); PyAPI_FUNC(PyObject *) Py... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pitrou |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width