Tk Source Code

Check-in [4487567a]
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. Disallow Tk 8.5.x to be loaded in any Tcl 8.5 alpha release.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA1: 4487567aa7d5dc994541fc74436d645fbe7cbe22
User & Date: jan.nijtmans 2013-01-15 16:58:13
Context
2013-01-15
17:21
fix comment check-in: 62c60529 user: jan.nijtmans tags: core-8-5-branch
17:18
More flexible search for win32 tclConfig.sh, backported from TEA. 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.6.x to be loaded in any Tcl 8.6 alpha/beta release. check-in: dc77a27c user: jan.nijtmans tags: trunk
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-14
16:10
and ChangeLog as well check-in: 8586f2cf user: jan.nijtmans tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tkConsole.c.

220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
    Tcl_Channel consoleChannel;

    /*
     * 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, "8.5", 0) == NULL) {
        return;
    }

    consoleInitPtr = Tcl_GetThreadData(&consoleInitKey, (int)sizeof(int));
    if (*consoleInitPtr) {
	/* We've already initialized console channels in this thread. */
	return;







|







220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
    Tcl_Channel consoleChannel;

    /*
     * 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, "8.5.0", 0) == NULL) {
        return;
    }

    consoleInitPtr = Tcl_GetThreadData(&consoleInitKey, (int)sizeof(int));
    if (*consoleInitPtr) {
	/* We've already initialized console channels in this thread. */
	return;

Changes to generic/tkMain.c.

132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
    Tcl_DString appName;

    /*
     * 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, "8.5", 0) == NULL) {
	abort();
    }

#if defined(__WIN32__) && !defined(__WIN64__) && !defined(STATIC_BUILD)

    if (tclStubsPtr->reserved9) {
	/* We are running win32 Tk under Cygwin, so let's check







|







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
    Tcl_DString appName;

    /*
     * 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, "8.5.0", 0) == NULL) {
	abort();
    }

#if defined(__WIN32__) && !defined(__WIN64__) && !defined(STATIC_BUILD)

    if (tclStubsPtr->reserved9) {
	/* We are running win32 Tk under Cygwin, so let's check

Changes to generic/tkWindow.c.

3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
    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, "8.5", 0) == NULL) {
	return TCL_ERROR;
    }

    /*
     * Ensure that our obj-types are registered with the Tcl runtime.
     */








|
<


|







3017
3018
3019
3020
3021
3022
3023
3024

3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
    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, "8.5.0", 0) == NULL) {
	return TCL_ERROR;
    }

    /*
     * Ensure that our obj-types are registered with the Tcl runtime.
     */

3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
	code = Tcl_VarEval(interp, "wm geometry . ", geometry, NULL);
	if (code != TCL_OK) {
	    goto done;
	}
	geometry = NULL;
    }

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

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

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







<
<
<
<
<







3252
3253
3254
3255
3256
3257
3258





3259
3260
3261
3262
3263
3264
3265
	code = Tcl_VarEval(interp, "wm geometry . ", geometry, NULL);
	if (code != TCL_OK) {
	    goto done;
	}
	geometry = NULL;
    }






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

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

Changes to tests/font.test.

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
    .b.c dchars text 0 end
    .b.c insert text 0 $str
    .b.c focus text
}

setup

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


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

test font-1.1 {TkFontPkgInit} {







|


<







42
43
44
45
46
47
48
49
50
51

52
53
54
55
56
57
58
    .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} {