Tcl Source Code

View Ticket
Login
Ticket UUID: 971336
Title: Some possible static symbols in the core?
Type: RFE Created on: 2004-06-11 18:24:42
Submitter: coldstore Assigned to: msofer
Subsystem: 07. Variables Severity:
Priority: 2 Last modified: 2026-11-13 11:18:45
Status: Closed Closed by: serhiy.storchaka
Resolution: Fixed Closed on: 2026-11-13 11:18:43
Version: None
Description:
As requested by dgp, the following is a list of symbols
exported by some source file in tcl core (generic and
unix) but not referenced anywhere in that part of the
core.  They may be candidates for being declared static.

tclObjHashKeyType TclDateps TclDatepv TclDatechar
TclRegisterAuxDataType TclLookupLiteralEntry TclSetEnv
TclDatetmp TclObjUnsetVar2 TclDateerrflag TclDatestate
tclFsPathType TclDates TclDatev TclDateval
tclPlatStubsPtr TclRememberCondition main TclpReadlink
TclPrintSource tclIntPlatStubs TclLookupSimpleVar
TclDate_TclDates TclDate_TclDatev tclArrayHashKeyType
tclStringHashKeyType tclIntPlatStubsPtr TclUnsetEnv
tclStubsPtr Tcl_InterpObjCmd tclRegexpType TclDatedebug
TclPrintObject TclThreadDataKeySet
TclFSMakePathFromNormalized tclIntStubs TclDatelval
TclPrintInstruction TclCompileVariableCmd
TclpUnloadFile TclTraceExecutionObjCmd
tclOneWordHashKeyType TclTraceVariableObjCmd
TclRememberMutex TclTraceCommandObjCmd
tclParsedVarNameType TclDateparse TclRememberDataKey
TclDatenerrs Tcl_AppInit TclpLoadFile
TclNativeDupInternalRep tclPlatStubs tclIntStubsPtr
tclLocalVarNameType
User Comments:
dkf added on 2004-07-07 15:16:19:
Logged In: YES 
user_id=79902

TclDate* functions and variables are that way because of the
way yacc operates.  It'd be better to scrap that file :^)

Some of those symbols refer to objTypes that ought to be
used elsewhere but which aren't.

dkf added on 2004-07-07 15:25:08:
Logged In: YES 
user_id=79902

You also list main() :) and a number of stubs-related things
that are going to be referred to from elsewhere. :(

(Some things are public because they are used from certain
extensions; many of the things in the bytecode engine are
actually like that.)

I've fixed those undeclared object types.

dkf added on 2006-01-09 16:30:40:
Logged In: YES 
user_id=79902

Candidates for going 'static':
  TclLookupSimpleVar
  TclTraceExecutionObjCmd
  TclTraceVariableObjCmd
  TclTraceCommandObjCmd

Grounds for this:
 * Not declared in any header file (in 8.5); that might
indicate that they are part of an internal API that may be
exposed in the future (or which was exposed in the past) and
which might therefore require consultation.
 * Not part of the TclDate stuff (which is thankfully
greatly cleaned up in 8.5 anyway; there are only 4 global
TclDate syms now: TclDatechar TclDatelval TclDatenerrs
TclDateparse)
 * Not part of the stubs/init area, where declarations are a
bit non-standard anyway.

Cleaned up the code in tclTrace.c; assigning to tclVar.c
maintainer for consideration of the other function.

serhiy.storchaka added on 2026-11-13 11:18:45:

All the symbols in this list are now static, MODULE_SCOPE, or part of the stubs tables, and none of them is exported from libtcl9.1.so.