Tk Source Code

Update of ”Migrating C extensions to Tk 9”
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: 2775ca08f78b27ab627a0f87d75094fe29cd07a6d42746a06e9005dad3550d93
Page Name:Migrating C extensions to Tk 9
Date: 2025-01-30 13:13:01
Original User: oehhar
Mimetype:text/x-markdown
Parent: 4b5266c2332c526fe47c3f5dead4fbf6dae0399a1e756b521f7cfe14a42efae9 (diff)
Content

(Work in progress...)

Init stubs and package require with open version

The list of versions should include Tk 9. Here is an example for Tk 8.5 up to any Tk 9 version. Note that the upper bound "10" is exclusive.

    if (Tk_InitStubs(interp, "8.5-10", 0) == NULL) {
        return TCL_ERROR;
    }

The Tk_InitStubs command changed in the following aspects:

Tk_ConfigureWidget argc/argv interface removed

Tk_ConfigureWidget has two interfaces, and argc/argv and and TCL object interface. The argc/argv interface is removed.

Code which uses the TCL object interface (which has the TK_CONFIG_OBJS option in the flags parameter) does not need any change.

See TIP 647 for details.