-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Tkinter: incompatible pointer types warnings when built with Tcl 9 #112672
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
There is ongoing debate upstream about what is actually needed here, most recently in https://sourceforge.net/p/tcl/mailman/tcl-core/thread/74564788-7d69-4c42-9205-c5f3e6a1409d%40elmicron.de/ |
* Add declaration of Tcl_AppInit(), missing in Tcl 9.0. * Use Tcl_Size instead of int where needed. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
In future we may change more code to support longer data in Python->Tcl conversion. But this requires testing, because not always the library supports larger than 2GiB data even if the size type is 64-bit (for example SQLite has 32-bit limitation even in its 64-bit API), |
* Add declaration of Tcl_AppInit(), missing in Tcl 9.0. * Use Tcl_Size instead of int where needed. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Add declaration of Tcl_AppInit(), missing in Tcl 9.0. * Use Tcl_Size instead of int where needed. (cherry picked from commit e079935) Co-authored-by: Christopher Chavez <chrischavez@gmx.us> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Add declaration of Tcl_AppInit(), missing in Tcl 9.0. * Use Tcl_Size instead of int where needed. (cherry picked from commit e079935) Co-authored-by: Christopher Chavez <chrischavez@gmx.us> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Add declaration of Tcl_AppInit(), missing in Tcl 9.0. * Use Tcl_Size instead of int where needed. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Add declaration of Tcl_AppInit(), missing in Tcl 9.0. * Use Tcl_Size instead of int where needed. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Tcl/Tk 9 changes C APIs to use a different type for sizes to allow transferring ≥32-bit sized things. The new type is
Tcl_Size
, which as of TIP 660 is defined as eitherptrdiff_t
in Tcl 9, orint
in Tcl 8.7 for binary compatibility.My impression is that Tcl/Tk wrappers such as Tkinter, which are primarily used for Tk GUI, have little if any need for this. But as of TIP 664, usage of APIs which previously expected
int *
must be updated for Tcl 9. There was previously effort in Tcl to continue allowingint *
usage for compatibility, and maybe that would have been good enough for Tkinter, but others in the Tcl/Tk inner circle (who already wish to abandon Tcl/Tk < 9 entirely) rejected that approach.-Wincompatible-pointer-types
warnings now seen under Tcl 9:Code intending to remain compatible with Tcl 8.6 is suggested to use the following after including tcl.h:
I intend to open a PR updating _tkinter.c to pass
Tcl_Size *
where needed.There are several other instances where Tkinter assumes Tcl expects
int
or something not larger thanINT_MAX
, but migrating those toTcl_Size
andTCL_SIZE_MAX
seems optional.Linked PRs
Tcl_Size
to avoid incompatible pointer type warnings #112681The text was updated successfully, but these errors were encountered: