Tk Source Code

Check-in [c72168ce]
Login

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

Overview
Comment:Don't use deprecated "case" any more. Don't do unnecessary Tcl_PkgRequire(..., "Tcl", ...), the preceding Tcl_InitStubs() call already does that, both for dynamic loaded as wel as the static case.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-4-branch
Files: files | file ages | folders
SHA1: c72168ce320dc037392e618615fb4e7b8fec3828
User & Date: jan.nijtmans 2013-01-15 16:48:13
Context
2013-01-16
15:33
Don't compile Tk with -DTCL_NO_DEPRECATED by default any more, it might hurt when we compile Tk 8.x against Tcl 8.y with y > x, because new deprecated constructs might be added in higher Tcl versions (except for Tk 8.6, for now, because there is no higher 8.x yet) check-in: 62e30f2b user: jan.nijtmans tags: core-8-4-branch
2013-01-15
16:58
Don't use deprecated "case" any more. Don't do unnecessary Tcl_PkgRequire(..., "Tcl", ...), the preceding Tcl_InitStubs() call already does that, both for dynamic loaded as wel as the static case. Disallow Tk 8.5.x to be loaded in any Tcl 8.5 alpha release. check-in: 4487567a user: jan.nijtmans tags: core-8-5-branch
16:48
Don't use deprecated "case" any more. Don't do unnecessary Tcl_PkgRequire(..., "Tcl", ...), the preceding Tcl_InitStubs() call already does that, both for dynamic loaded as wel as the static case. check-in: c72168ce user: jan.nijtmans tags: core-8-4-branch
2013-01-11
10:32
add [file normalize] to UNIX pkgIndex.tcl too check-in: fb142fc7 user: jan.nijtmans tags: core-8-4-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tkWindow.c.

3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
    CONST char **argv;
    char *args[20];
    CONST char *argString = NULL;
    Tcl_DString class;
    ThreadSpecificData *tsdPtr;

    /*
     * Ensure that we are getting the matching version of Tcl.  This is
     * really only an issue when Tk is loaded dynamically.
     */

    if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
        return TCL_ERROR;
    }

    /*







|
<







3013
3014
3015
3016
3017
3018
3019
3020

3021
3022
3023
3024
3025
3026
3027
    CONST char **argv;
    char *args[20];
    CONST char *argString = NULL;
    Tcl_DString class;
    ThreadSpecificData *tsdPtr;

    /*
     * Ensure that we are getting the matching version of Tcl.

     */

    if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
        return TCL_ERROR;
    }

    /*
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
	code = Tcl_VarEval(interp, "wm geometry . ", geometry, (char *) NULL);
	if (code != TCL_OK) {
	    goto done;
	}
        geometry = NULL;
    }

    if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 1) == NULL) {
	code = TCL_ERROR;
	goto done;
    }

    /*
     * Provide Tk and its stub table.
     */

    code = Tcl_PkgProvideEx(interp, "Tk", TK_VERSION, (ClientData) &tkStubs);
    if (code != TCL_OK) {
	goto done;







<
<
<
<
<







3237
3238
3239
3240
3241
3242
3243





3244
3245
3246
3247
3248
3249
3250
	code = Tcl_VarEval(interp, "wm geometry . ", geometry, (char *) NULL);
	if (code != TCL_OK) {
	    goto done;
	}
        geometry = NULL;
    }






    /*
     * Provide Tk and its stub table.
     */

    code = Tcl_PkgProvideEx(interp, "Tk", TK_VERSION, (ClientData) &tkStubs);
    if (code != TCL_OK) {
	goto done;

Changes to tests/font.test.

45
46
47
48
49
50
51
52
53
54

55


56
57
58
59
60
61
62
    .b.c dchars text 0 end
    .b.c insert text 0 $str
    .b.c focus text
}

setup

case $tcl_platform(platform) {
    unix	{set fixed "fixed"}
    windows	{set fixed "courier 12"}

}


set times [font actual {times 0} -family]

test font-1.1 {TkFontPkgInit} {
    catch {interp delete foo}
    interp create foo
    foo eval {
	load {} Tk







|
|
|
>

>
>







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
    .b.c dchars text 0 end
    .b.c insert text 0 $str
    .b.c focus text
}

setup

switch [tk windowingsystem] {
    x11	 	{set fixed "fixed"}
    win32	{set fixed "courier 12"}
    aqua	{set fixed "monaco 9"}
}


set times [font actual {times 0} -family]

test font-1.1 {TkFontPkgInit} {
    catch {interp delete foo}
    interp create foo
    foo eval {
	load {} Tk