Skip to content

Try to use Limited API #234

Description

@skirpichev

Used PyLong-API functions:

$ grep 'PyLong_[^(]' *.c|sed 's/.*\(PyLong_[^(]\+\)(.*/\1/'|sort|uniq
PyLong_AsInt
PyLong_AsInt64
PyLong_AsLong
PyLong_AsLongAndOverflow
PyLong_AsLongLongAndOverflow
PyLong_AsSdigit_t
PyLong_AsSsize_t
PyLong_AsUnsignedLongLong
PyLong_Check
PyLong_CheckExact
PyLong_Export
PyLong_FreeExport
PyLong_FromInt64
PyLong_FromLong
PyLong_FromSize_t
PyLong_FromString
PyLong_FromUInt64
PyLong_FromUnsignedLongLong
PyLong_GetNativeLayout

Missing (v3.15):

  • Import/Export API
  • PyLong_FromUnicodeObject // 6487714
  • PyLong_IsNegative

The contents of Limited API: https://docs.python.org/3.15/c-api/stable.html#limited-api-list

Ah, and this require conversion mpz to heap type: #195.

Limited API supports free-threading since v3.15.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions