tclVar.c File Reference

#include "tclInt.h"

Go to the source code of this file.

Defines

#define VarHashGetValue(hPtr)   ((Var *) ((char *)hPtr - TclOffset(VarInHash, entry)))
#define VarHashFindVar(tablePtr, key)   VarHashCreateVar((tablePtr), (key), NULL)
#define VarHashInvalidateEntry(varPtr)   ((varPtr)->flags |= VAR_DEAD_HASH)
#define VarHashDeleteEntry(varPtr)   Tcl_DeleteHashEntry(&(((VarInHash *) varPtr)->entry))
#define VarHashFirstEntry(tablePtr, searchPtr)   Tcl_FirstHashEntry((Tcl_HashTable *) (tablePtr), (searchPtr))
#define VarHashNextEntry(searchPtr)   Tcl_NextHashEntry((searchPtr))
#define VarHashGetKey(varPtr)   (((VarInHash *)(varPtr))->entry.key.objPtr)
#define VarHashDeleteTable(tablePtr)   Tcl_DeleteHashTable((Tcl_HashTable *) (tablePtr))
#define HasLocalVars(framePtr)   ((framePtr)->isProcCallFrame & FRAME_IS_PROC)
#define ENABLE_NS_VARNAME_CACHING   0
#define AVOID_RESOLVERS   0x40000

Functions

MODULE_SCOPE VarTclLookupSimpleVar (Tcl_Interp *interp, Tcl_Obj *varNamePtr, int flags, const int create, const char **errMsgPtr, int *indexPtr)
VarTclVarHashCreateVar (TclVarHashTable *tablePtr, const char *key, int *newPtr)
void TclCleanupVar (Var *varPtr, Var *arrayPtr)
VarTclLookupVar (Tcl_Interp *interp, const char *part1, const char *part2, int flags, const char *msg, int createPart1, int createPart2, Var **arrayPtrPtr)
VarTclObjLookupVar (Tcl_Interp *interp, register Tcl_Obj *part1Ptr, const char *part2, int flags, const char *msg, const int createPart1, const int createPart2, Var **arrayPtrPtr)
VarTclObjLookupVarEx (Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, int flags, const char *msg, const int createPart1, const int createPart2, Var **arrayPtrPtr)
VarTclLookupArrayElement (Tcl_Interp *interp, Tcl_Obj *arrayNamePtr, Tcl_Obj *elNamePtr, const int flags, const char *msg, const int createArray, const int createElem, Var *arrayPtr, int index)
const char * Tcl_GetVar (Tcl_Interp *interp, const char *varName, int flags)
const char * Tcl_GetVar2 (Tcl_Interp *interp, const char *part1, const char *part2, int flags)
Tcl_ObjTcl_GetVar2Ex (Tcl_Interp *interp, const char *part1, const char *part2, int flags)
Tcl_ObjTcl_ObjGetVar2 (Tcl_Interp *interp, register Tcl_Obj *part1Ptr, register Tcl_Obj *part2Ptr, int flags)
Tcl_ObjTclPtrGetVar (Tcl_Interp *interp, register Var *varPtr, Var *arrayPtr, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, const int flags, int index)
int Tcl_SetObjCmd (ClientData dummy, register Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
const char * Tcl_SetVar (Tcl_Interp *interp, const char *varName, const char *newValue, int flags)
const char * Tcl_SetVar2 (Tcl_Interp *interp, const char *part1, const char *part2, const char *newValue, int flags)
Tcl_ObjTcl_SetVar2Ex (Tcl_Interp *interp, const char *part1, const char *part2, Tcl_Obj *newValuePtr, int flags)
Tcl_ObjTcl_ObjSetVar2 (Tcl_Interp *interp, register Tcl_Obj *part1Ptr, register Tcl_Obj *part2Ptr, Tcl_Obj *newValuePtr, int flags)
Tcl_ObjTclPtrSetVar (Tcl_Interp *interp, register Var *varPtr, Var *arrayPtr, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, Tcl_Obj *newValuePtr, const int flags, int index)
Tcl_ObjTclIncrObjVar2 (Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, Tcl_Obj *incrPtr, int flags)
Tcl_ObjTclPtrIncrObjVar (Tcl_Interp *interp, Var *varPtr, Var *arrayPtr, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, Tcl_Obj *incrPtr, const int flags, int index)
int Tcl_UnsetVar (Tcl_Interp *interp, const char *varName, int flags)
int Tcl_UnsetVar2 (Tcl_Interp *interp, const char *part1, const char *part2, int flags)
int TclObjUnsetVar2 (Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, int flags)
int Tcl_UnsetObjCmd (ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
int Tcl_AppendObjCmd (ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
int Tcl_LappendObjCmd (ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
int Tcl_ArrayObjCmd (ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
int TclArraySet (Tcl_Interp *interp, Tcl_Obj *arrayNameObj, Tcl_Obj *arrayElemObj)
int TclPtrMakeUpvar (Tcl_Interp *interp, Var *otherPtr, const char *myName, int myFlags, int index)
int TclPtrObjMakeUpvar (Tcl_Interp *interp, Var *otherPtr, Tcl_Obj *myNamePtr, int myFlags, int index)
int Tcl_UpVar (Tcl_Interp *interp, const char *frameName, const char *varName, const char *localName, int flags)
int Tcl_UpVar2 (Tcl_Interp *interp, const char *frameName, const char *part1, const char *part2, const char *localName, int flags)
void Tcl_GetVariableFullName (Tcl_Interp *interp, Tcl_Var variable, Tcl_Obj *objPtr)
int Tcl_GlobalObjCmd (ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
int Tcl_VariableObjCmd (ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
int Tcl_UpvarObjCmd (ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
void TclDeleteNamespaceVars (Namespace *nsPtr)
void TclDeleteVars (Interp *iPtr, TclVarHashTable *tablePtr)
void TclDeleteCompiledLocalVars (Interp *iPtr, CallFrame *framePtr)
void TclVarErrMsg (Tcl_Interp *interp, const char *part1, const char *part2, const char *operation, const char *reason)
void TclObjVarErrMsg (Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, const char *operation, const char *reason, int index)
Tcl_Var Tcl_FindNamespaceVar (Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNsPtr, int flags)
int TclInfoVarsCmd (ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
int TclInfoGlobalsCmd (ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
int TclInfoLocalsCmd (ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
void TclInitVarHashTable (TclVarHashTable *tablePtr, Namespace *nsPtr)

Variables

Tcl_ObjType tclArraySearchType


Define Documentation

#define AVOID_RESOLVERS   0x40000

Definition at line 803 of file tclVar.c.

Referenced by TclLookupSimpleVar(), and TclPtrObjMakeUpvar().

#define ENABLE_NS_VARNAME_CACHING   0

Definition at line 216 of file tclVar.c.

#define HasLocalVars ( framePtr   )     ((framePtr)->isProcCallFrame & FRAME_IS_PROC)

#define VarHashDeleteEntry ( varPtr   )     Tcl_DeleteHashEntry(&(((VarInHash *) varPtr)->entry))

Definition at line 74 of file tclVar.c.

Referenced by TclDeleteNamespaceVars().

#define VarHashDeleteTable ( tablePtr   )     Tcl_DeleteHashTable((Tcl_HashTable *) (tablePtr))

Definition at line 113 of file tclVar.c.

Referenced by TclDeleteNamespaceVars(), and TclDeleteVars().

#define VarHashFindVar ( tablePtr,
key   )     VarHashCreateVar((tablePtr), (key), NULL)

Definition at line 68 of file tclVar.c.

#define VarHashFirstEntry ( tablePtr,
searchPtr   )     Tcl_FirstHashEntry((Tcl_HashTable *) (tablePtr), (searchPtr))

Definition at line 77 of file tclVar.c.

Referenced by Tcl_ArrayObjCmd().

#define VarHashGetKey ( varPtr   )     (((VarInHash *)(varPtr))->entry.key.objPtr)

#define VarHashGetValue ( hPtr   )     ((Var *) ((char *)hPtr - TclOffset(VarInHash, entry)))

Definition at line 49 of file tclVar.c.

#define VarHashInvalidateEntry ( varPtr   )     ((varPtr)->flags |= VAR_DEAD_HASH)

Definition at line 71 of file tclVar.c.

Referenced by TclDeleteVars().

#define VarHashNextEntry ( searchPtr   )     Tcl_NextHashEntry((searchPtr))

Definition at line 80 of file tclVar.c.


Function Documentation

int Tcl_AppendObjCmd ( ClientData  dummy,
Tcl_Interp interp,
int  objc,
Tcl_Obj *const   objv[] 
)

Tcl_Var Tcl_FindNamespaceVar ( Tcl_Interp interp,
const char *  name,
Tcl_Namespace contextNsPtr,
int  flags 
)

Definition at line 4870 of file tclVar.c.

References Tcl_DecrRefCount, Tcl_IncrRefCount, and Tcl_NewStringObj().

const char* Tcl_GetVar ( Tcl_Interp interp,
const char *  varName,
int  flags 
)

Definition at line 1192 of file tclVar.c.

References Tcl_GetVar2().

const char* Tcl_GetVar2 ( Tcl_Interp interp,
const char *  part1,
const char *  part2,
int  flags 
)

Definition at line 1227 of file tclVar.c.

References Tcl_GetVar2Ex(), and TclGetString.

Tcl_Obj* Tcl_GetVar2Ex ( Tcl_Interp interp,
const char *  part1,
const char *  part2,
int  flags 
)

Definition at line 1271 of file tclVar.c.

References Tcl_DecrRefCount, Tcl_IncrRefCount, Tcl_NewStringObj(), and Tcl_ObjGetVar2().

int Tcl_GlobalObjCmd ( ClientData  dummy,
Tcl_Interp interp,
int  objc,
Tcl_Obj *const   objv[] 
)

Tcl_Obj* Tcl_ObjGetVar2 ( Tcl_Interp interp,
register Tcl_Obj part1Ptr,
register Tcl_Obj part2Ptr,
int  flags 
)

Tcl_Obj* Tcl_ObjSetVar2 ( Tcl_Interp interp,
register Tcl_Obj part1Ptr,
register Tcl_Obj part2Ptr,
Tcl_Obj newValuePtr,
int  flags 
)

int Tcl_SetObjCmd ( ClientData  dummy,
register Tcl_Interp interp,
int  objc,
Tcl_Obj *const   objv[] 
)

const char* Tcl_SetVar ( Tcl_Interp interp,
const char *  varName,
const char *  newValue,
int  flags 
)

Definition at line 1516 of file tclVar.c.

References Tcl_SetVar2().

const char* Tcl_SetVar2 ( Tcl_Interp interp,
const char *  part1,
const char *  part2,
const char *  newValue,
int  flags 
)

Tcl_Obj* Tcl_SetVar2Ex ( Tcl_Interp interp,
const char *  part1,
const char *  part2,
Tcl_Obj newValuePtr,
int  flags 
)

Definition at line 1628 of file tclVar.c.

References Tcl_DecrRefCount, Tcl_IncrRefCount, Tcl_NewStringObj(), and Tcl_ObjSetVar2().

int Tcl_UnsetObjCmd ( ClientData  dummy,
Tcl_Interp interp,
int  objc,
Tcl_Obj *const   objv[] 
)

Definition at line 2437 of file tclVar.c.

References TCL_ERROR, TCL_LEAVE_ERR_MSG, TCL_OK, TclGetString, and TclObjUnsetVar2().

int Tcl_UnsetVar ( Tcl_Interp interp,
const char *  varName,
int  flags 
)

Definition at line 2092 of file tclVar.c.

References Tcl_UnsetVar2().

int Tcl_UnsetVar2 ( Tcl_Interp interp,
const char *  part1,
const char *  part2,
int  flags 
)

int Tcl_UpVar ( Tcl_Interp interp,
const char *  frameName,
const char *  varName,
const char *  localName,
int  flags 
)

Definition at line 3676 of file tclVar.c.

References Tcl_UpVar2().

int Tcl_UpVar2 ( Tcl_Interp interp,
const char *  frameName,
const char *  part1,
const char *  part2,
const char *  localName,
int  flags 
)

Definition at line 3712 of file tclVar.c.

References Tcl_DecrRefCount, TCL_ERROR, Tcl_IncrRefCount, Tcl_NewStringObj(), and TclGetFrame().

int Tcl_UpvarObjCmd ( ClientData  dummy,
Tcl_Interp interp,
int  objc,
Tcl_Obj *const   objv[] 
)

Definition at line 4071 of file tclVar.c.

References TCL_ERROR, TCL_OK, Tcl_WrongNumArgs(), and TclObjGetFrame().

int Tcl_VariableObjCmd ( ClientData  dummy,
Tcl_Interp interp,
int  objc,
Tcl_Obj *const   objv[] 
)

void TclCleanupVar ( Var varPtr,
Var arrayPtr 
)

Definition at line 317 of file tclVar.c.

Referenced by TclExecuteByteCode(), TclPtrGetVar(), TclPtrSetVar(), and TclVarTraceExists().

void TclDeleteCompiledLocalVars ( Interp iPtr,
CallFrame framePtr 
)

Tcl_Obj* TclIncrObjVar2 ( Tcl_Interp interp,
Tcl_Obj part1Ptr,
Tcl_Obj part2Ptr,
Tcl_Obj incrPtr,
int  flags 
)

Definition at line 1964 of file tclVar.c.

References Tcl_AddObjErrorInfo(), TclObjLookupVarEx(), and TclPtrIncrObjVar().

Referenced by Tcl_IncrObjCmd().

int TclInfoLocalsCmd ( ClientData  dummy,
Tcl_Interp interp,
int  objc,
Tcl_Obj *const   objv[] 
)

Var* TclLookupArrayElement ( Tcl_Interp interp,
Tcl_Obj arrayNamePtr,
Tcl_Obj elNamePtr,
const int  flags,
const char *  msg,
const int  createArray,
const int  createElem,
Var arrayPtr,
int  index 
)

Var* TclLookupVar ( Tcl_Interp interp,
const char *  part1,
const char *  part2,
int  flags,
const char *  msg,
int  createPart1,
int  createPart2,
Var **  arrayPtrPtr 
)

Definition at line 365 of file tclVar.c.

References Tcl_IncrRefCount, Tcl_NewStringObj(), TclDecrRefCount, and TclObjLookupVar().

Var* TclObjLookupVar ( Tcl_Interp interp,
register Tcl_Obj part1Ptr,
const char *  part2,
int  flags,
const char *  msg,
const int  createPart1,
const int  createPart2,
Var **  arrayPtrPtr 
)

Definition at line 442 of file tclVar.c.

References Tcl_DecrRefCount, Tcl_IncrRefCount, Tcl_NewStringObj(), and TclObjLookupVarEx().

int TclObjUnsetVar2 ( Tcl_Interp interp,
Tcl_Obj part1Ptr,
Tcl_Obj part2Ptr,
int  flags 
)

void TclObjVarErrMsg ( Tcl_Interp interp,
Tcl_Obj part1Ptr,
Tcl_Obj part2Ptr,
const char *  operation,
const char *  reason,
int  index 
)

Tcl_Obj* TclPtrGetVar ( Tcl_Interp interp,
register Var varPtr,
Var arrayPtr,
Tcl_Obj part1Ptr,
Tcl_Obj part2Ptr,
const int  flags,
int  index 
)

Tcl_Obj* TclPtrIncrObjVar ( Tcl_Interp interp,
Var varPtr,
Var arrayPtr,
Tcl_Obj part1Ptr,
Tcl_Obj part2Ptr,
Tcl_Obj incrPtr,
const int  flags,
int  index 
)

int TclPtrMakeUpvar ( Tcl_Interp interp,
Var otherPtr,
const char *  myName,
int  myFlags,
int  index 
)

void TclVarErrMsg ( Tcl_Interp interp,
const char *  part1,
const char *  part2,
const char *  operation,
const char *  reason 
)

Definition at line 4610 of file tclVar.c.

References Tcl_DecrRefCount, Tcl_IncrRefCount, Tcl_NewStringObj(), and TclObjVarErrMsg().

Var* TclVarHashCreateVar ( TclVarHashTable tablePtr,
const char *  key,
int *  newPtr 
)

Definition at line 251 of file tclVar.c.

References Tcl_DecrRefCount, Tcl_IncrRefCount, and Tcl_NewStringObj().


Variable Documentation

Initial value:

 {
    "array search",
    NULL, NULL, NULL, SetArraySearchObj
}

Definition at line 245 of file tclVar.c.



Generated on Wed Mar 12 12:18:34 2008 by  doxygen 1.5.1