From e2b504bf3a2dc5aabd16dd640f75e87553dcf25a Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 15 Jan 2013 16:48:13 +0000 Subject: 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. --- generic/tkWindow.c | 8 +------- tests/font.test | 9 ++++++--- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 2bccbb9..40b2fed 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -3017,8 +3017,7 @@ Initialize(interp) ThreadSpecificData *tsdPtr; /* - * Ensure that we are getting the matching version of Tcl. This is - * really only an issue when Tk is loaded dynamically. + * Ensure that we are getting the matching version of Tcl. */ if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) { @@ -3242,11 +3241,6 @@ Initialize(interp) geometry = NULL; } - if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 1) == NULL) { - code = TCL_ERROR; - goto done; - } - /* * Provide Tk and its stub table. */ diff --git a/tests/font.test b/tests/font.test index 94953b1..2479334 100644 --- a/tests/font.test +++ b/tests/font.test @@ -49,10 +49,13 @@ proc csetup {{str ""}} { setup -case $tcl_platform(platform) { - unix {set fixed "fixed"} - windows {set fixed "courier 12"} +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} { -- cgit v0.12