You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Tcl 8.0.5 (tcltk/tcl@17481a9), tcl.h has clarified that Tcl_AppInit() is not an exported Tcl library function, and declares Tcl_AppInit() for compatibility/convenience only:
/* *---------------------------------------------------------------------------- * Convenience declaration of Tcl_AppInit for backwards compatibility. This * function is not *implemented* by the tcl library, so the storage class is * neither DLLEXPORT nor DLLIMPORT. */externTcl_AppInitProcTcl_AppInit;
This declaration is deprecated in Tcl 8.7 and removed in Tcl 9.0. Without it, _tkinter.c will fail to build if the compiler treats implicit function declarations as errors:
./Modules/_tkinter.c:713:9: error: call to undeclared function 'Tcl_AppInit'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
if (Tcl_AppInit(v->interp) != TCL_OK) {
^
./Modules/_tkinter.c:713:9: note: did you mean 'Tcl_Init'?
/Users/user/tcl90p/include/tclDecls.h:513:13: note: 'Tcl_Init' declared here
EXTERN int Tcl_Init(Tcl_Interp *interp);
^
Although it seems possible to have _tkinter.c declare Tcl_AppInit() when tcl.h does not, I am not familiar enough with Tcl_AppInit() usage to know whether that is a good solution. From reading the Tcl_AppInit() documentation, it sounds like Tkinter could instead rename its Tcl_AppInit() in tkappinit.c to something else, which it then always declares in _tkinter.c.
The text was updated successfully, but these errors were encountered:
If the user code uses an embedded Python or a custom build of Python with statically linked Tcl/Tk and third-party binary Tcl/Tk libraries, they will still be able to define a custom Tcl_AppInit().
In future we may implement more modern approach, but this minimum is necessary to build Tkinter with Tcl/Tk 9.0.
I'll add this change in #112681 because both changes are needed to unblock a build.
Since Tcl 8.0.5 (tcltk/tcl@17481a9), tcl.h has clarified that
Tcl_AppInit()
is not an exported Tcl library function, and declaresTcl_AppInit()
for compatibility/convenience only:This declaration is deprecated in Tcl 8.7 and removed in Tcl 9.0. Without it, _tkinter.c will fail to build if the compiler treats implicit function declarations as errors:
Although it seems possible to have _tkinter.c declare
Tcl_AppInit()
when tcl.h does not, I am not familiar enough withTcl_AppInit()
usage to know whether that is a good solution. From reading theTcl_AppInit()
documentation, it sounds like Tkinter could instead rename itsTcl_AppInit()
in tkappinit.c to something else, which it then always declares in _tkinter.c.The text was updated successfully, but these errors were encountered: