From 99a90efbfdf094cdb59e8136873498c98322b1b3 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 8 Dec 2020 10:14:49 +0000 Subject: TIP #590 follow-up: Adapt documentation and tclStubLib.c --- doc/abstract.n | 2 +- doc/callback.n | 2 +- doc/class.n | 2 +- doc/classvariable.n | 2 +- doc/clock.n | 2 +- doc/copy.n | 2 +- doc/define.n | 2 +- doc/fpclassify.n | 2 +- doc/link.n | 2 +- doc/mathfunc.n | 2 +- doc/mathop.n | 2 +- doc/msgcat.n | 2 +- doc/my.n | 2 +- doc/next.n | 2 +- doc/object.n | 2 +- doc/self.n | 2 +- doc/singleton.n | 2 +- doc/tcltest.n | 1 - generic/tclStubLib.c | 11 ++++++----- tools/makeHeader.tcl | 2 +- 20 files changed, 24 insertions(+), 24 deletions(-) diff --git a/doc/abstract.n b/doc/abstract.n index 022c24b..c58abd8 100644 --- a/doc/abstract.n +++ b/doc/abstract.n @@ -12,7 +12,7 @@ oo::abstract \- a class that does not allow direct instances of itself .SH SYNOPSIS .nf -package require TclOO +package require tcl::oo \fBoo::abstract\fI method \fR?\fIarg ...\fR? .fi diff --git a/doc/callback.n b/doc/callback.n index 95838a9..3ab81ac 100644 --- a/doc/callback.n +++ b/doc/callback.n @@ -12,7 +12,7 @@ callback, mymethod \- generate callbacks to methods .SH SYNOPSIS .nf -package require TclOO +package require tcl::oo \fBcallback\fR \fImethodName\fR ?\fIarg ...\fR? \fBmymethod\fR \fImethodName\fR ?\fIarg ...\fR? diff --git a/doc/class.n b/doc/class.n index 198ae41..c48f52d 100644 --- a/doc/class.n +++ b/doc/class.n @@ -12,7 +12,7 @@ oo::class \- class of all classes .SH SYNOPSIS .nf -package require TclOO +package require tcl::oo \fBoo::class\fI method \fR?\fIarg ...\fR? .fi diff --git a/doc/classvariable.n b/doc/classvariable.n index 0798bb2..70d9f13 100644 --- a/doc/classvariable.n +++ b/doc/classvariable.n @@ -13,7 +13,7 @@ classvariable \- create link from local variable to variable in class .SH SYNOPSIS .nf -package require TclOO +package require tcl::oo \fBclassvariable\fR \fIvariableName\fR ?\fI...\fR? .fi diff --git a/doc/clock.n b/doc/clock.n index 6a887d9..6b15fba 100644 --- a/doc/clock.n +++ b/doc/clock.n @@ -8,7 +8,7 @@ .SH NAME clock \- Obtain and manipulate dates and times .SH "SYNOPSIS" -package require \fBTcl 8.5\fR +package require \fBTcl 8.5-\fR .sp \fBclock add\fR \fItimeVal\fR ?\fIcount unit...\fR? ?\fI\-option value\fR? .sp diff --git a/doc/copy.n b/doc/copy.n index 706be54..56160a0 100644 --- a/doc/copy.n +++ b/doc/copy.n @@ -12,7 +12,7 @@ oo::copy \- create copies of objects and classes .SH SYNOPSIS .nf -package require TclOO +package require tcl::oo \fBoo::copy\fI sourceObject \fR?\fItargetObject\fR? ?\fItargetNamespace\fR? .fi diff --git a/doc/define.n b/doc/define.n index 9046203..19969da 100644 --- a/doc/define.n +++ b/doc/define.n @@ -12,7 +12,7 @@ oo::define, oo::objdefine \- define and configure classes and objects .SH SYNOPSIS .nf -package require TclOO +package require tcl::oo \fBoo::define\fI class defScript\fR \fBoo::define\fI class subcommand arg\fR ?\fIarg ...\fR? diff --git a/doc/fpclassify.n b/doc/fpclassify.n index 41c658c..22d365e 100644 --- a/doc/fpclassify.n +++ b/doc/fpclassify.n @@ -12,7 +12,7 @@ .SH NAME fpclassify \- Floating point number classification of Tcl values .SH SYNOPSIS -package require \fBTcl 8.7\fR +package require \fBtcl 8.7\fR .sp \fBfpclassify \fIvalue\fR .BE diff --git a/doc/link.n b/doc/link.n index 7219342..e06be33 100644 --- a/doc/link.n +++ b/doc/link.n @@ -13,7 +13,7 @@ link \- create link from command to method of object .SH SYNOPSIS .nf -package require TclOO +package require tcl::oo \fBlink\fR \fImethodName\fR ?\fI...\fR? \fBlink\fR \fB{\fIcommandName methodName\fB}\fR ?\fI...\fR? diff --git a/doc/mathfunc.n b/doc/mathfunc.n index 3b7d915..004b7e3 100644 --- a/doc/mathfunc.n +++ b/doc/mathfunc.n @@ -13,7 +13,7 @@ .SH NAME mathfunc \- Mathematical functions for Tcl expressions .SH SYNOPSIS -package require \fBTcl 8.5\fR +package require \fBTcl 8.5-\fR .sp \fB::tcl::mathfunc::abs\fR \fIarg\fR .br diff --git a/doc/mathop.n b/doc/mathop.n index 1c70e95..3a13456 100644 --- a/doc/mathop.n +++ b/doc/mathop.n @@ -11,7 +11,7 @@ .SH NAME mathop \- Mathematical operators as Tcl commands .SH SYNOPSIS -package require \fBTcl 8.5\fR +package require \fBTcl 8.5-\fR .sp \fB::tcl::mathop::!\fR \fInumber\fR .br diff --git a/doc/msgcat.n b/doc/msgcat.n index 3d87ffd..74a7020 100644 --- a/doc/msgcat.n +++ b/doc/msgcat.n @@ -11,7 +11,7 @@ .SH NAME msgcat \- Tcl message catalog .SH SYNOPSIS -\fBpackage require Tcl 8.7\fR +\fBpackage require tcl 8.7\fR .sp \fBpackage require msgcat 1.7\fR .sp diff --git a/doc/my.n b/doc/my.n index 4618525..3464a87 100644 --- a/doc/my.n +++ b/doc/my.n @@ -12,7 +12,7 @@ my, myclass \- invoke any method of current object or its class .SH SYNOPSIS .nf -package require TclOO +package require tcl::oo \fBmy\fI methodName\fR ?\fIarg ...\fR? \fBmyclass\fI methodName\fR ?\fIarg ...\fR? diff --git a/doc/next.n b/doc/next.n index 8ebaed2..f731335 100644 --- a/doc/next.n +++ b/doc/next.n @@ -12,7 +12,7 @@ next, nextto \- invoke superclass method implementations .SH SYNOPSIS .nf -package require TclOO +package require tcl::oo \fBnext\fR ?\fIarg ...\fR? \fBnextto\fI class\fR ?\fIarg ...\fR? diff --git a/doc/object.n b/doc/object.n index df657a9..98679d1 100644 --- a/doc/object.n +++ b/doc/object.n @@ -12,7 +12,7 @@ oo::object \- root class of the class hierarchy .SH SYNOPSIS .nf -package require TclOO +package require tcl::oo \fBoo::object\fI method \fR?\fIarg ...\fR? .fi diff --git a/doc/self.n b/doc/self.n index 855d067..14f68c7 100644 --- a/doc/self.n +++ b/doc/self.n @@ -12,7 +12,7 @@ self \- method call internal introspection .SH SYNOPSIS .nf -package require TclOO +package require tcl::oo \fBself\fR ?\fIsubcommand\fR? .fi diff --git a/doc/singleton.n b/doc/singleton.n index 568a8bd..3ccbdd3 100644 --- a/doc/singleton.n +++ b/doc/singleton.n @@ -12,7 +12,7 @@ oo::singleton \- a class that does only allows one instance of itself .SH SYNOPSIS .nf -package require TclOO +package require tcl::oo \fBoo::singleton\fI method \fR?\fIarg ...\fR? .fi diff --git a/doc/tcltest.n b/doc/tcltest.n index 25e5e5e..5a53699 100644 --- a/doc/tcltest.n +++ b/doc/tcltest.n @@ -1179,7 +1179,6 @@ Here is a sketch of a sample test suite main script: .RS .PP .CS -package require Tcl 8.6 package require tcltest 2.5 package require example \fB::tcltest::configure\fR -testdir \e diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index 22e8b9b..4f7240d 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -54,10 +54,11 @@ Tcl_InitStubs( int exact, int magic) { - Interp *iPtr = (Interp *) interp; + Interp *iPtr = (Interp *)interp; const char *actualVersion = NULL; ClientData pkgData = NULL; const TclStubs *stubsPtr = iPtr->stubTable; + const char *tclName = (((exact&0xFF00) >= 0x900) ? "tcl" : "Tcl"); /* * We can't optimize this check by caching tclStubsPtr because that @@ -67,11 +68,11 @@ Tcl_InitStubs( if (!stubsPtr || (stubsPtr->magic != (((exact&0xFF00) >= 0x900) ? magic : TCL_STUB_MAGIC))) { iPtr->result = (char *)"interpreter uses an incompatible stubs mechanism"; - iPtr->freeProc = 0; + iPtr->freeProc = 0; /* TCL_STATIC */ return NULL; } - actualVersion = stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 0, &pkgData); + actualVersion = stubsPtr->tcl_PkgRequireEx(interp, tclName, version, 0, &pkgData); if (actualVersion == NULL) { return NULL; } @@ -91,11 +92,11 @@ Tcl_InitStubs( } if (*p || ISDIGIT(*q)) { /* Construct error message */ - stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 1, NULL); + stubsPtr->tcl_PkgRequireEx(interp, tclName, version, 1, NULL); return NULL; } } else { - actualVersion = stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 1, NULL); + actualVersion = stubsPtr->tcl_PkgRequireEx(interp, tclName, version, 1, NULL); if (actualVersion == NULL) { return NULL; } diff --git a/tools/makeHeader.tcl b/tools/makeHeader.tcl index c72219f..1d961c9 100644 --- a/tools/makeHeader.tcl +++ b/tools/makeHeader.tcl @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. -package require Tcl 8.6 +package require Tcl 8.6- namespace eval makeHeader { -- cgit v0.12