tclNamesp.c File Reference#include "tclInt.h"
Go to the source code of this file.
|
Data Structures |
struct | ThreadSpecificData |
struct | ResolvedNsName |
struct | EnsembleConfig |
Defines |
#define | ENS_DEAD 0x1 |
#define | INIT_EXPORT_PATTERNS 5 |
Functions |
void | TclInitNamespaceSubsystem (void) |
Tcl_Namespace * | Tcl_GetCurrentNamespace (register Tcl_Interp *interp) |
Tcl_Namespace * | Tcl_GetGlobalNamespace (register Tcl_Interp *interp) |
int | Tcl_PushCallFrame (Tcl_Interp *interp, Tcl_CallFrame *callFramePtr, Tcl_Namespace *namespacePtr, int isProcCallFrame) |
void | Tcl_PopCallFrame (Tcl_Interp *interp) |
int | TclPushStackFrame (Tcl_Interp *interp, Tcl_CallFrame **framePtrPtr, Tcl_Namespace *namespacePtr, int isProcCallFrame) |
void | TclPopStackFrame (Tcl_Interp *interp) |
Tcl_Namespace * | Tcl_CreateNamespace (Tcl_Interp *interp, const char *name, ClientData clientData, Tcl_NamespaceDeleteProc *deleteProc) |
void | Tcl_DeleteNamespace (Tcl_Namespace *namespacePtr) |
void | TclTeardownNamespace (register Namespace *nsPtr) |
int | Tcl_Export (Tcl_Interp *interp, Tcl_Namespace *namespacePtr, const char *pattern, int resetListFirst) |
int | Tcl_AppendExportList (Tcl_Interp *interp, Tcl_Namespace *namespacePtr, Tcl_Obj *objPtr) |
int | Tcl_Import (Tcl_Interp *interp, Tcl_Namespace *namespacePtr, const char *pattern, int allowOverwrite) |
int | Tcl_ForgetImport (Tcl_Interp *interp, Tcl_Namespace *namespacePtr, const char *pattern) |
Tcl_Command | TclGetOriginalCommand (Tcl_Command command) |
int | TclGetNamespaceForQualName (Tcl_Interp *interp, const char *qualName, Namespace *cxtNsPtr, int flags, Namespace **nsPtrPtr, Namespace **altNsPtrPtr, Namespace **actualCxtPtrPtr, const char **simpleNamePtr) |
Tcl_Namespace * | Tcl_FindNamespace (Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNsPtr, register int flags) |
Tcl_Command | Tcl_FindCommand (Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNsPtr, int flags) |
void | TclResetShadowedCmdRefs (Tcl_Interp *interp, Command *newCmdPtr) |
int | TclGetNamespaceFromObj (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Namespace **nsPtrPtr) |
int | Tcl_NamespaceObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) |
void | TclSetNsPath (Namespace *nsPtr, int pathLength, Tcl_Namespace *pathAry[]) |
void | TclInvalidateNsPath (Namespace *nsPtr) |
Tcl_Obj * | Tcl_GetNamespaceUnknownHandler (Tcl_Interp *interp, Tcl_Namespace *nsPtr) |
int | Tcl_SetNamespaceUnknownHandler (Tcl_Interp *interp, Tcl_Namespace *nsPtr, Tcl_Obj *handlerPtr) |
Tcl_Command | Tcl_CreateEnsemble (Tcl_Interp *interp, const char *name, Tcl_Namespace *namespacePtr, int flags) |
int | Tcl_SetEnsembleSubcommandList (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj *subcmdList) |
int | Tcl_SetEnsembleMappingDict (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj *mapDict) |
int | Tcl_SetEnsembleUnknownHandler (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj *unknownList) |
int | Tcl_SetEnsembleFlags (Tcl_Interp *interp, Tcl_Command token, int flags) |
int | Tcl_GetEnsembleSubcommandList (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj **subcmdListPtr) |
int | Tcl_GetEnsembleMappingDict (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj **mapDictPtr) |
int | Tcl_GetEnsembleUnknownHandler (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj **unknownListPtr) |
int | Tcl_GetEnsembleFlags (Tcl_Interp *interp, Tcl_Command token, int *flagsPtr) |
int | Tcl_GetEnsembleNamespace (Tcl_Interp *interp, Tcl_Command token, Tcl_Namespace **namespacePtrPtr) |
Tcl_Command | Tcl_FindEnsemble (Tcl_Interp *interp, Tcl_Obj *cmdNameObj, int flags) |
int | Tcl_IsEnsemble (Tcl_Command token) |
Tcl_Command | TclMakeEnsemble (Tcl_Interp *interp, const char *name, const EnsembleImplMap map[]) |
void | Tcl_LogCommandInfo (Tcl_Interp *interp, const char *script, const char *command, int length) |
Variables |
Tcl_ObjType | tclEnsembleCmdType |
Define Documentation
#define INIT_EXPORT_PATTERNS 5 |
Function Documentation
Definition at line 5242 of file tclNamesp.c.
References ckalloc, ENSEMBLE_COMPILE, Namespace::ensembles, EnsembleConfig::epoch, Namespace::exportLookupEpoch, EnsembleConfig::flags, Namespace::fullName, EnsembleConfig::next, EnsembleConfig::nsPtr, Namespace::parentPtr, EnsembleConfig::subcmdList, EnsembleConfig::subcommandArrayPtr, EnsembleConfig::subcommandDict, EnsembleConfig::subcommandTable, Tcl_AppendStringsToObj(), Tcl_CreateObjCommand(), Tcl_IncrRefCount, Tcl_InitHashTable(), Tcl_NewStringObj(), TCL_STRING_KEYS, TclCompileEnsemble(), TclDecrRefCount, TclGetCurrentNamespace, TclGetString, EnsembleConfig::token, and EnsembleConfig::unknownHandler.
Tcl_Namespace* Tcl_CreateNamespace |
( |
Tcl_Interp * |
interp, |
|
|
const char * |
name, |
|
|
ClientData |
clientData, |
|
|
Tcl_NamespaceDeleteProc * |
deleteProc | |
|
) |
| | |
Definition at line 719 of file tclNamesp.c.
References Namespace::activationCount, Namespace::childTable, ckalloc, Namespace::clientData, Namespace::cmdRefEpoch, Namespace::cmdResProc, Namespace::cmdTable, Namespace::commandPathArray, Namespace::commandPathLength, Namespace::commandPathSourceList, Namespace::compiledVarResProc, Namespace::deleteProc, Namespace::ensembles, Namespace::exportArrayPtr, Namespace::exportLookupEpoch, Namespace::flags, Namespace::fullName, Interp::globalNsPtr, Namespace::interp, Namespace::maxExportPatterns, Namespace::name, Namespace::nsId, EnsembleConfig::nsPtr, Namespace::numExportPatterns, ThreadSpecificData::numNsCreated, Namespace::parentPtr, Namespace::refCount, Namespace::resolverEpoch, Tcl_AppendResult(), TCL_CREATE_NS_IF_UNKNOWN, Tcl_CreateHashEntry, Tcl_DStringAppend(), Tcl_DStringFree(), Tcl_DStringInit(), Tcl_DStringLength, Tcl_DStringSetLength(), Tcl_DStringValue, Tcl_FindHashEntry, Tcl_InitHashTable(), TCL_LEAVE_ERR_MSG, Tcl_ResetResult(), Tcl_SetHashValue, TCL_STRING_KEYS, TCL_TSD_INIT, TclGetNamespaceForQualName(), TclInitVarHashTable(), Namespace::unknownHandlerPtr, Interp::varFramePtr, Namespace::varResProc, and Namespace::varTable.
Definition at line 913 of file tclNamesp.c.
References Namespace::activationCount, Namespace::childTable, DELETED, Namespace::ensembles, Namespace::flags, Namespace::interp, Namespace::name, EnsembleConfig::next, NS_DEAD, NS_DYING, NS_KILLED, EnsembleConfig::nsPtr, Namespace::parentPtr, Tcl_DecrRefCount, Tcl_DeleteCommandFromToken(), Tcl_DeleteHashEntry(), Tcl_DeleteHashTable(), Tcl_FindHashEntry, TclDeleteNamespaceVars(), TclGetGlobalNamespace, TclTeardownNamespace(), EnsembleConfig::token, and Namespace::unknownHandlerPtr.
Referenced by Tcl_PopCallFrame(), and TclTeardownNamespace().
Definition at line 1231 of file tclNamesp.c.
References ckfree, Namespace::exportArrayPtr, Namespace::maxExportPatterns, EnsembleConfig::nsPtr, Namespace::numExportPatterns, Tcl_AppendResult(), TCL_ERROR, TCL_LEAVE_ERR_MSG, TCL_NAMESPACE_ONLY, TCL_OK, TclGetCurrentNamespace, TclGetNamespaceForQualName(), and TclInvalidateNsCmdLookup.
Definition at line 2343 of file tclNamesp.c.
References ResolverScheme::cmdResProc, Namespace::cmdResProc, Namespace::cmdTable, Namespace::commandPathArray, Namespace::commandPathLength, Namespace::flags, ResolverScheme::nextPtr, NS_DYING, NamespacePathEntry::nsPtr, Interp::resolverPtr, TCL_CONTINUE, Tcl_FindHashEntry, Tcl_GetHashValue, TCL_GLOBAL_ONLY, TCL_NAMESPACE_ONLY, TCL_OK, TclGetCurrentNamespace, TclGetGlobalNamespace, and TclGetNamespaceForQualName().
Definition at line 1706 of file tclNamesp.c.
References Namespace::cmdTable, Command::deleteProc, Tcl_CmdInfo::namespacePtr, EnsembleConfig::nsPtr, Command::objClientData, ImportedCmdData::realCmdPtr, Tcl_AppendResult(), Tcl_DeleteCommandFromToken(), TCL_ERROR, Tcl_FindHashEntry, Tcl_FirstHashEntry(), Tcl_GetCommandInfoFromToken(), Tcl_GetCommandName(), Tcl_GetHashKey, Tcl_GetHashValue, TCL_LEAVE_ERR_MSG, TCL_NAMESPACE_ONLY, Tcl_NextHashEntry(), TCL_OK, Tcl_SetErrorCode(), Tcl_StringMatch(), TclGetCurrentNamespace, TclGetNamespaceForQualName(), TclGetOriginalCommand(), TclMatchIsTrivial, and EnsembleConfig::token.
Definition at line 1429 of file tclNamesp.c.
References Namespace::cmdTable, Namespace::name, EnsembleConfig::nsPtr, Tcl_AppendResult(), Tcl_DecrRefCount, TCL_ERROR, Tcl_EvalObjv(), Tcl_FindCommand(), Tcl_FindHashEntry, Tcl_FirstHashEntry(), Tcl_GetHashKey, TCL_GLOBAL_ONLY, Tcl_IncrRefCount, TCL_LEAVE_ERR_MSG, TCL_NAMESPACE_ONLY, Tcl_NewStringObj(), Tcl_NextHashEntry(), TCL_OK, Tcl_ResetResult(), Tcl_SetErrorCode(), Tcl_SetObjResult(), Tcl_StringMatch(), TclGetCurrentNamespace, TclGetNamespaceForQualName(), TclMatchIsTrivial, and TclNewLiteralStringObj.
void Tcl_LogCommandInfo |
( |
Tcl_Interp * |
interp, |
|
|
const char * |
script, |
|
|
const char * |
command, |
|
|
int |
length | |
|
) |
| | |
Definition at line 6906 of file tclNamesp.c.
References Interp::eiVar, ERR_ALREADY_LOGGED, Interp::errorInfo, Interp::errorLine, Interp::flags, Tcl_AppendObjToErrorInfo(), Tcl_FindHashEntry, Tcl_GetHashValue, TCL_GLOBAL_ONLY, Tcl_ObjPrintf(), Tcl_ObjSetVar2(), TclIsVarTraced, TclObjLookupVarEx(), VarTrace::traceProc, and Interp::varTraces.
int Tcl_NamespaceObjCmd |
( |
ClientData |
clientData, |
|
|
Tcl_Interp * |
interp, |
|
|
int |
objc, |
|
|
Tcl_Obj *const |
objv[] | |
|
) |
| | |
Definition at line 448 of file tclNamesp.c.
References Namespace::activationCount, CallFrame::callerPtr, CallFrame::callerVarPtr, ckfree, Namespace::flags, Interp::framePtr, Interp::globalNsPtr, iPtr, CallFrame::localCachePtr, NS_DYING, CallFrame::nsPtr, EnsembleConfig::nsPtr, CallFrame::numCompiledLocals, LocalCache::refCount, Tcl_DeleteNamespace(), TclDeleteCompiledLocalVars(), TclDeleteVars(), TclFreeLocalCache(), Interp::varFramePtr, and CallFrame::varTablePtr.
Referenced by TclObjInterpProcCore(), and TclPopStackFrame().
Definition at line 350 of file tclNamesp.c.
References Namespace::activationCount, CallFrame::callerPtr, CallFrame::callerVarPtr, CallFrame::clientData, CallFrame::compiledLocals, Namespace::flags, Interp::framePtr, iPtr, CallFrame::isProcCallFrame, CallFrame::level, CallFrame::localCachePtr, NS_DEAD, CallFrame::nsPtr, EnsembleConfig::nsPtr, CallFrame::numCompiledLocals, CallFrame::objc, CallFrame::objv, CallFrame::procPtr, TCL_OK, Tcl_Panic(), TclGetCurrentNamespace, Interp::varFramePtr, and CallFrame::varTablePtr.
Referenced by Tcl_CreateInterp(), and TclPushStackFrame().
Definition at line 5555 of file tclNamesp.c.
References ENS_DEAD, ENSEMBLE_COMPILE, Namespace::exportLookupEpoch, EnsembleConfig::flags, EnsembleConfig::nsPtr, Command::objClientData, Command::objProc, Tcl_AppendResult(), TCL_ERROR, TCL_OK, TclCompileEnsemble(), and EnsembleConfig::token.
Referenced by TclMakeEnsemble().
Definition at line 5396 of file tclNamesp.c.
References Command::compileProc, Namespace::exportLookupEpoch, EnsembleConfig::nsPtr, Command::objClientData, Command::objProc, EnsembleConfig::subcommandDict, Tcl_AppendResult(), Tcl_DictObjDone(), Tcl_DictObjFirst(), Tcl_DictObjNext(), Tcl_DictObjSize(), TCL_ERROR, Tcl_IncrRefCount, Tcl_ListObjIndex(), TCL_OK, TclDecrRefCount, and TclGetString.
Referenced by TclInitChanCmd(), and TclMakeEnsemble().
Definition at line 5323 of file tclNamesp.c.
References Command::compileProc, Namespace::exportLookupEpoch, EnsembleConfig::nsPtr, Command::objClientData, Command::objProc, EnsembleConfig::subcmdList, Tcl_AppendResult(), TCL_ERROR, Tcl_IncrRefCount, TCL_OK, TclDecrRefCount, and TclListObjLength.
Definition at line 5491 of file tclNamesp.c.
References Namespace::exportLookupEpoch, EnsembleConfig::nsPtr, Command::objClientData, Command::objProc, Tcl_AppendResult(), TCL_ERROR, Tcl_IncrRefCount, TCL_OK, TclDecrRefCount, TclListObjLength, and EnsembleConfig::unknownHandler.
Definition at line 2027 of file tclNamesp.c.
References Namespace::childTable, Interp::globalNsPtr, CallFrame::nsPtr, EnsembleConfig::nsPtr, TCL_CREATE_NS_IF_UNKNOWN, Tcl_CreateNamespace(), Tcl_DStringAppend(), Tcl_DStringFree(), Tcl_DStringInit(), Tcl_DStringSetLength(), Tcl_DStringValue, TCL_FIND_ONLY_NS, Tcl_FindHashEntry, Tcl_GetHashValue, TCL_GLOBAL_ONLY, TCL_NAMESPACE_ONLY, TCL_OK, Tcl_Panic(), TclPopStackFrame(), TclPushStackFrame(), and Interp::varFramePtr.
void TclInitNamespaceSubsystem |
( |
void |
|
) |
|
void TclInvalidateNsPath |
( |
Namespace * |
nsPtr |
) |
|
Definition at line 5916 of file tclNamesp.c.
References compile, EnsembleImplMap::compileProc, Command::compileProc, ENSEMBLE_COMPILE, EnsembleImplMap::name, Tcl_AppendToObj(), TCL_CREATE_NS_IF_UNKNOWN, Tcl_CreateEnsemble(), Tcl_CreateObjCommand(), Tcl_DictObjPut(), Tcl_DStringAppend(), Tcl_DStringFree(), Tcl_DStringInit(), Tcl_DStringLength, Tcl_DStringValue, TCL_ENSEMBLE_PREFIX, Tcl_FindNamespace(), Tcl_NewStringObj(), Tcl_Panic(), Tcl_SetEnsembleFlags(), Tcl_SetEnsembleMappingDict(), TclGetString, TclNewObj, and TclNewStringObj.
Referenced by TclInitChanCmd(), TclInitDictCmd(), TclInitInfoCmd(), and TclInitStringCmd().
Definition at line 2542 of file tclNamesp.c.
References Namespace::childTable, Namespace::cmdRefEpoch, Namespace::cmdTable, Command::hPtr, Namespace::name, Command::nsPtr, EnsembleConfig::nsPtr, Namespace::parentPtr, Namespace::resolverEpoch, Tcl_HashEntry::tablePtr, Tcl_FindHashEntry, Tcl_GetHashKey, Tcl_GetHashValue, TclGetGlobalNamespace, TclInvalidateNsPath(), TclStackAlloc(), TclStackFree(), and TclStackRealloc().
Referenced by Tcl_CreateCommand(), Tcl_CreateObjCommand(), and TclRenameCommand().
void TclTeardownNamespace |
( |
register Namespace * |
nsPtr |
) |
|
Definition at line 1055 of file tclNamesp.c.
References ckfree, Namespace::cmdRefEpoch, NamespacePathEntry::creatorNsPtr, NamespacePathEntry::nextPtr, NamespacePathEntry::nsPtr, Tcl_DeleteCommandFromToken(), Tcl_DeleteHashEntry(), Tcl_DeleteHashTable(), Tcl_DeleteNamespace(), Tcl_FindHashEntry, Tcl_FirstHashEntry(), Tcl_GetHashValue, Tcl_InitHashTable(), TCL_STRING_KEYS, TclDeleteNamespaceVars(), and TclInitVarHashTable().
Variable Documentation
Initial value: {
"ensembleCommand",
FreeEnsembleCmdRep,
DupEnsembleCmdRep,
StringOfEnsembleCmdRep,
NULL
}
Definition at line 249 of file tclNamesp.c.
Generated on Wed Mar 12 12:18:33 2008 by
1.5.1
|