Skip to content

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commented Aug 24, 2023

Remove private PyLong C API functions:

  • _PyLong_AsByteArray()
  • _PyLong_DivmodNear()
  • _PyLong_Format()
  • _PyLong_Frexp()
  • _PyLong_FromByteArray()
  • _PyLong_FromBytes()
  • _PyLong_GCD()
  • _PyLong_Lshift()
  • _PyLong_Rshift()

Move these functions to the internal C API. No longer export _PyLong_FromBytes() function.

Remove private PyLong C API functions: * _PyLong_AsByteArray() * _PyLong_DivmodNear() * _PyLong_Format() * _PyLong_Frexp() * _PyLong_FromByteArray() * _PyLong_FromBytes() * _PyLong_GCD() * _PyLong_Lshift() * _PyLong_Rshift() Move these functions to the internal C API. No longer export _PyLong_FromBytes() function.
@vstinnervstinner changed the title 106320: Remove private PyLong C API functionsgh-106320: Remove private PyLong C API functionsAug 24, 2023
@rhettingerrhettinger removed their request for review August 24, 2023 16:30
@vstinner
Copy link
MemberAuthor

@erlend-aasland: sqlite3 uses another private function, _PyLong_AsByteArray().

@vstinnervstinner merged commit c55e731 into python:mainAug 24, 2023
@vstinnervstinner deleted the internal_long branch August 24, 2023 16:53
@scoder
Copy link
Contributor

What is the intended replacement for _PyLong_FromByteArray() ?

@scoder
Copy link
Contributor

What is the intended replacement for _PyLong_GCD() ?

@vstinner
Copy link
MemberAuthor

vstinner commented Oct 20, 2023

@scoder:

What is the intended replacement for _PyLong_FromByteArray() ?

I created PR #111140: C API: Consider adding public PyLong_AsByteArray() and PyLong_FromByteArray() functions.

What is the intended replacement for _PyLong_GCD() ?

I created PR #111139: C API: Consider adding a public PyLong_GCD() function.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@vstinner@scoder@bedevere-bot