4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
|
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
|
-
-
+
+
|
* local variable in a procedure. If we allowed this, the local
* variable in the shorter-lived procedure frame could go away leaving
* the namespace var's reference invalid.
*/
if (index < 0) {
if (!(arrayPtr != NULL
? (TclIsVarInHash(arrayPtr) && TclGetVarNsPtr(arrayPtr))
: (TclIsVarInHash(otherPtr) && TclGetVarNsPtr(otherPtr)))
? (TclIsVarInHash(arrayPtr) && TclGetVarNsPtr(arrayPtr))
: (TclIsVarInHash(otherPtr) && TclGetVarNsPtr(otherPtr)))
&& ((myFlags & (TCL_GLOBAL_ONLY | TCL_NAMESPACE_ONLY))
|| (varFramePtr == NULL)
|| !HasLocalVars(varFramePtr)
|| (strstr(TclGetString(myNamePtr), "::") != NULL))) {
Tcl_SetObjResult((Tcl_Interp *) iPtr, Tcl_ObjPrintf(
"bad variable name \"%s\": can't create namespace "
"variable that refers to procedure variable",
|