D 2014-08-30T01:29:05.819 L Embedding\sSupport P 720a97572754382f2e82b2b01d62e787c401e4e5 U dgp W 2112

Source Files

* [/finfo?name=generic/tclMain.c|tclMain.c] * [/finfo?name=generic/tclPanic.c|tclPanic.c] * [/finfo?name=unix/tclAppInit.c|tclAppInit.c] * [/finfo?name=win/tclAppInit.c|tclAppInit.c]

Public Interface

* Tcl_SetStartupScript * Tcl_GetStartupScript * Tcl_SourceRCFile * Tcl_Main * Tcl_MainEx * Tcl_SetMainLoop * Tcl_SetPanicProc * Tcl_PanicVA * Tcl_Panic

Private Interface

* TclFullFinalizationRequested * TclGetMainLoop

Directly Depends On Public Interface

* [Threads] * [Object System and Fundamental Object Types] * [Variable Commands and Interfaces] * [Pathname Management] * [Filesystem Access] * [Channel System] * [list Object Type] * [Preservation] * [Parsing and Evaluation] * [interp] * [Event Loops] * [dict Object Type] * [Linked C Variables] * [history] * unistd.h

Directly Depends On Private Interface of

* [Initialization, Library, Autoloader] * [Pathname Management] * [Object System and Fundamental Object Types] * [Parsing and Evaluation] * [Allocation] * [Environment Variables]

Discussion

This has been considered a single module, but tclPanic.c is essentially a self contained bit without dependencies, while tclMain.c depends on nearly everything. Most other parts of Tcl that claim a dependence on this module are really just callers of Tcl_Panic. One wrinkle is the routine tclWinDebugPanic which is in multiple places, tclWinError.c and tclWinFile.c. There's also a great deal of #ifdef in tclPanic.c. A restructuring into a generic caller of TclpPanic might be a path to increasing simplicity and conventionality. The routine TclGetMainLoop is another to note. It appears in no header file. It gets declared with MODULE_SCOPE but there doesn't appear to be any reason it could not be a static function. The routine TclFullFInalizationRequested probably should move into [Event Loops]. Z cba1c08b02e843ff96a8785bed0bc46d