Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Provide PyLong conversions with Py_(u)intptr_t #110863

Closed
Labels
@pitrou

Description

@pitrou

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_FUNC(Py_intptr_t)PyLong_AsInptr_t(PyObject*);PyAPI_FUNC(Py_uintptr_t)PyLong_AsUinptr_t(PyObject*);

Note that the given integers types should exist, as they have official counterpartsin C99.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

There is a discussion of a similar feature in#62070, but I would argue thatintptr_t anduintptr_t are much more common in real life thatintmax_t.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp