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

Tkinter uses deprecated functionsmp_to_unsigned_bin_n() andmp_unsigned_bin_size() #104399

Closed
@chrstphrchvz

Description

@chrstphrchvz

_tkinter.c currently uses the functionsmp_to_unsigned_bin_n() andmp_unsigned_bin_size(), which were deprecated in libtommath 1.2.0 and replaced by new functionsmp_to_ubin() andmp_ubin_size().

The deprecated functions are removed from future libtommath and Tcl 9.0, leaving _tkinter.c unable to build:

./Modules/_tkinter.c:1089:16: error: call to undeclared function 'mp_unsigned_bin_size'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]    numBytes = mp_unsigned_bin_size(&bigValue);               ^./Modules/_tkinter.c:1095:9: error: call to undeclared function 'TclBN_mp_to_unsigned_bin_n'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]    if (mp_to_unsigned_bin_n(&bigValue, bytes,        ^/Users/user/tcl90p/include/tclTomMathDecls.h:153:30: note: expanded from macro 'mp_to_unsigned_bin_n'#define mp_to_unsigned_bin_n TclBN_mp_to_unsigned_bin_n                             ^

TIP 538 says that Tcl 8.7/9.0 can build against external libtommath 1.2.0 or later. So ifTCL_WITH_EXTERNAL_TOMMATH is defined, or ifTCL_MAJOR_VERSION >= 9, thenmp_to_ubin() andmp_ubin_size() should be available.

Even thoughmp_to_ubin() andmp_ubin_size() have been available since Tcl 8.6.10 (the first release to bundle libtommath 1.2.0),mp_to_ubin() was added as a new ABI, unlikemp_ubin_size() which was added by having the existing ABI formp_unsigned_bin_size() returnsize_t instead ofint. So Tkinter presumably could use the new functions when built with Tcl 8.6.10 through 8.7 only if there is no expectation for that build to work with Tcl 8.5.12 through 8.6.9; otherwise the deprecated functions can continue to be used for Tcl < 9.

Note that Tcl 8.7 with bundled libtommath currently only warns aboutmp_to_unsigned_bin_n() being deprecated:

./Modules/_tkinter.c:1099:9: warning: 'TclBN_mp_to_unsigned_bin_n' is deprecated [-Wdeprecated-declarations]    if (mp_to_unsigned_bin_n(&bigValue, bytes,        ^/Users/user/tcl87p/include/tclTomMathDecls.h:150:30: note: expanded from macro 'mp_to_unsigned_bin_n'#define mp_to_unsigned_bin_n TclBN_mp_to_unsigned_bin_n                             ^/Users/user/tcl87p/include/tclTomMathDecls.h:316:1: note: 'TclBN_mp_to_unsigned_bin_n' has been explicitly marked deprecated hereTCL_DEPRECATED("Use mp_to_ubin")^/Users/user/tcl87p/include/tclDecls.h:33:37: note: expanded from macro 'TCL_DEPRECATED'# define TCL_DEPRECATED(msg) EXTERN TCL_DEPRECATED_API(msg)                                    ^/Users/user/tcl87p/include/tcl.h:181:50: note: expanded from macro 'TCL_DEPRECATED_API'#       define TCL_DEPRECATED_API(msg)  __attribute__ ((__deprecated__))                                                        ^

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp