Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2026-11-13
11:18 • Closed ticket [971336ffff]: Some possible static symbols in the core? plus 6... artifact: 0cde6a8a7d user: serhiy.storchaka
2006-01-09
16:30 • Ticket [971336ffff]: 6 changes artifact: 679feb3352 user: dkf
2004-07-07
15:25 • Ticket [971336ffff]: 4 changes artifact: c7049afa8c user: dkf
15:16 • Ticket [971336ffff]: 4 changes artifact: 98285ca351 user: dkf
2004-06-11
18:24 • New ticket [971336ffff]. artifact: 5e876ecddb user: coldstore

Some possible static symbols in the core?

Closed / Fixed971336ffffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 20 days ago
Descriptionplain2004-06-11 18:24:42
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
dkfplain2004-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.
dkfplain2004-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.
dkfplain2006-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.storchakawiki2026-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.

Log in (anonymous is fine) to add a comment.