Overview
| Comment: | Patch 976520 reworks several of the details involved with startup/initialization of the Tcl library, focused on the activities of Tcl_FindExecutable(). * generic/tclIO.c: Removed bogus claim in comment that encoding "iso8859-1" is "built-in" to Tcl. * generic/tclInt.h: Created a new struct ProcessGlobalValue, * generic/tclUtil.c: routines Tcl(Get|Set)ProcessGlobalValue, and function type TclInitProcessGlobalValueProc. Together, these take care of the housekeeping for "values" (things that can be held in a Tcl_Obj) that are global across a whole process. That is, they are shared among multiple threads, and epoch and mutex protection must govern the validity of cached copies maintained in each thread. * generic/tclNotify.c: Modified TclInitNotifier() to tolerate being called multiple times in the same thread. * generic/tclEvent.c: Dropped the unused argv0 argument to TclInitSubsystems(). Removed machinery to unsure only one TclInitNotifier() call per thread, now that that is safe. Converted Tcl(Get|Set)LibraryPath to use a ProcessGlobalValue, and moved them to tclEncoding.c. * generic/tclBasic.c: Updated caller. * generic/tclInt.h: TclpFindExecutable now returns void. * unix/tclUnixFile.c: * win/tclWinFile.c: * win/tclWinPipe.c: * generic/tclEncoding.c: Built new encoding search initialization on a foundation of ProcessGlobalValues, exposing new routines Tcl(Get|Set)EncodingSearchPath. A cache of a map from encoding name to directory pathname keeps track of where encodings are available for loading. Tcl_FindExecutable greatly simplified into just three function calls. The "library path" is now misnamed, as its only remaining purpose is as a foundation for the default encoding search path. * generic/tclInterp.c: Inlined the initScript that is evaluated by Tcl_Init(). Added verification after initScript evaluation that Tcl can find its installed *.enc files, and that it has initialized [encoding system] in agreement with what the environment expects. [tclInit] no longer driven by the value of $::tcl_libPath; it largely constructs its own search path now, rather than attempt to share one with the encoding system. * unix/tclUnixInit.c: TclpSetInitialEncodings factored so that a new * win/tclWinInit.c: routine TclpGetEncodingNameFromEnvironment can reveal that Tcl thinks the [encoding system] should be, even when an incomplete encoding search path, or a missing *.enc file won't allow that initialization to succeed. TclpInitLibraryPath reworked as an initializer of a ProcessGlobalValue. * unix/tclUnixTest.c: Update implementations of [testfindexecutable], [testgetdefenc], and [testsetdefenc]. * tests/unixInit.test: Corrected tests to operate properly even when a value of TCL_LIBRARY is required to find encodings. * generic/tclInt.decls: New internal stubs: TclGetEncodingSearchPath, TclSetEncodingSearchPath, TclpGetEncodingNameFromEnvironment. These are candidates for public exposure by future TIPs. * generic/tclIntDecls.h: make genstubs * generic/tclStubInit.c: * generic/tclTest.c: Updated [testencoding] to use * tests/encoding.test: Tcl(Get|Set)EncodingSearchPath. Updated tests. |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
5b205fd672e4cd2530d67359acc45f14 |
| User & Date: | dgp on 2004-11-30 19:34:44.000 |
| Other Links: | manifest | tags |
Context
|
2004-11-30
| ||
| 20:30 | * library/init.tcl ([unknown]): Restored the save/restore of the variables ::errorCo... check-in: e254f91796 user: dgp tags: trunk | |
| 19:34 | Patch 976520 reworks several of the details involved with startup/initialization of ... check-in: 5b205fd672 user: dgp tags: trunk | |
| 18:40 | corrected a typo that caused a compilation failure on VC++ check-in: d45737011c user: kennykb tags: trunk | |
Changes
Modified ChangeLog
from [f9a7625862]
to [1a890c9fd0].
[diff]
Modified generic/tclBasic.c
from [5001590820]
to [a395b33615].
[diff]
Modified generic/tclEncoding.c
from [bd60c67db7]
to [aad5ae53e5].
[diff]
Modified generic/tclEvent.c
from [cae12be538]
to [f7754872a8].
[diff]
Modified generic/tclIO.c
from [26dcab5cd8]
to [dafd84dfcf].
[diff]
Modified generic/tclInt.decls
from [f4f681a077]
to [c5c6f77587].
[diff]
Modified generic/tclInt.h
from [b49c15a50f]
to [4656735beb].
[diff]
Modified generic/tclIntDecls.h
from [7e1241ea94]
to [c3350aeb36].
[diff]
Modified generic/tclInterp.c
from [9410bd76c0]
to [156f8ac57a].
[diff]
Modified generic/tclNotify.c
from [f9210c301f]
to [b086075263].
[diff]
Modified generic/tclStubInit.c
from [465323ccc3]
to [d7af58ecd2].
[diff]
Modified generic/tclTest.c
from [6a2c2eecab]
to [e5f769a1d0].
[diff]
Modified generic/tclUtil.c
from [d86bd3cc22]
to [404442ead7].
[diff]
Modified tests/encoding.test
from [46d7c33148]
to [4afe2d9d02].
[diff]
Modified tests/unixInit.test
from [fd8365a0a3]
to [d100100bd1].
[diff]
Modified unix/tclUnixFile.c
from [2af12dfba4]
to [d3000f9b77].
[diff]
Modified unix/tclUnixInit.c
from [a7d8805441]
to [224ba86f40].
[diff]
Modified unix/tclUnixTest.c
from [3654ebe88f]
to [a8897db2bb].
[diff]
Modified win/tclWinFile.c
from [6717d90b3d]
to [de8cfacf51].
[diff]
Modified win/tclWinInit.c
from [017804c6d3]
to [75dd3cc85b].
[diff]
Modified win/tclWinPipe.c
from [e765d36044]
to [8009e0719c].
[diff]