Tk Source Code

Migrating C extensions to Tk 9
Login

(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.