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

C API: Rename _PyThreadState_GetUnchecked() to public PyThreadState_GetUnchecked #108867

Closed
@vstinner

Description

@vstinner

The _PyThreadState_UncheckedGet() function was added in Python 3.5 (2016) by issue#70342 with commitbfd316e. I was asked by PyPy developers to have an API to get the current thread state, but don't call Py_FatalError() if it's NULL. See:https://mail.python.org/pipermail/python-dev/2016-January/142767.html

In Python 3.13, I'm trying toremove private functions from the public C API: issue#106320.

Since _PyThreadState_UncheckedGet() had at least one user and exposing this API is revelant, I propose renaming the private _PyThreadState_UncheckedGet() function toPyThreadState_GetUnchecked() and so make it public, but not added it to the limited C API (not needed).

For the function name, see:capi-workgroup/problems#52 I propose to use theUnsafe suffix for "unsafe" function. Previously, the function usedUnchecked, but it wasn't a suffix!

UPDATE: I renamed PyThreadState_GetUnsafe() to PyThreadState_GetUnchecked().

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp