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

gh-104399: Use newer libtommath APIs when necessary#104407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
serhiy-storchaka merged 4 commits intopython:mainfromchrstphrchvz:patch-104399
Jun 6, 2023

Conversation

chrstphrchvz
Copy link
Contributor

@chrstphrchvzchrstphrchvz commentedMay 11, 2023
edited by bedevere-bot
Loading

@chrstphrchvz
Copy link
ContributorAuthor

As with#103842, this requires knowing whether Tcl was built withTCL_WITH_EXTERNAL_TOMMATH defined, which is something not currently available via pkg-config.

@gpshead
Copy link
Member

general thought: We could use a buildbot with bleeding edge versions of tcl/tk

@@ -65,6 +65,12 @@ Copyright (C) 1994 Steen Lumholt.
#endif
#include <tclTomMath.h>

#if defined(TCL_WITH_EXTERNAL_TOMMATH) || (TCL_MAJOR_VERSION >= 9)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The new API is available since 8.6.10. Would not be better to use it as soon as it is available? Potentially it can support larger integers.

Suggested change
#if defined(TCL_WITH_EXTERNAL_TOMMATH)|| (TCL_MAJOR_VERSION >=9)
#if defined(TCL_WITH_EXTERNAL_TOMMATH)|| (TK_HEX_VERSION >=0x0806020a)

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I am not familiar with libtommath APIs nor aware what the exact limits are, but I would think that Tcl is more likely to be the limiting factor anyway, as even the deprecated libtommath functions can handle numbers exceeding what Tcl < 9 can usefully convert to and from (due to various 2**31-1 size limitations on strings, etc.).

Given how Tkinter requires the Tcl version but not the patchlevel to match at compile time and runtime (#104399 (comment)), it should be fine to enable the new functions on Tcl 8.7; this would also allow not having to check forTCL_WITH_EXTERNAL_TOMMATH in this case (although it still has to be checked for#103842).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Agree.

@serhiy-storchakaserhiy-storchaka added needs backport to 3.11only security fixes needs backport to 3.12only security fixes labelsJun 2, 2023
@serhiy-storchakaserhiy-storchaka merged commit00d73ca intopython:mainJun 6, 2023
@miss-islington
Copy link
Contributor

Thanks@chrstphrchvz for the PR, and@serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJun 6, 2023
…04407)(cherry picked from commit00d73ca)Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
@bedevere-bot
Copy link

GH-105343 is a backport of this pull request to the3.12 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.12only security fixes labelJun 6, 2023
@bedevere-bot
Copy link

GH-105344 is a backport of this pull request to the3.11 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.11only security fixes labelJun 6, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJun 6, 2023
…04407)(cherry picked from commit00d73ca)Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
terryjreedy pushed a commit that referenced this pull requestJun 6, 2023
#105343)gh-104399: Use newer libtommath APIs when necessary (GH-104407)(cherry picked from commit00d73ca)Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
terryjreedy pushed a commit that referenced this pull requestJun 6, 2023
#105344)gh-104399: Use newer libtommath APIs when necessary (GH-104407)(cherry picked from commit00d73ca)Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
@chrstphrchvzchrstphrchvz deleted the patch-104399 branchJune 9, 2023 19:54
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@serhiy-storchakaserhiy-storchakaserhiy-storchaka left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@chrstphrchvz@gpshead@miss-islington@bedevere-bot@serhiy-storchaka

[8]ページ先頭

©2009-2025 Movatter.jp