12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
-
+
|
* Copyright (c) 1998-1999 by Scriptics Corporation.
* Copyright (c) 2001 by Kevin B. Kenny. All rights reserved.
* Copyright (c) 2007 Miguel Sofer
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: tclVar.c,v 1.153 2007/10/27 00:24:17 msofer Exp $
* RCS: @(#) $Id: tclVar.c,v 1.154 2007/11/03 01:47:13 msofer Exp $
*/
#include "tclInt.h"
/*
* Prototypes for the variable hash key methods.
*/
|
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
|
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
|
-
+
|
/*
* ERROR: part1Ptr is already an array element, cannot specify
* a part2.
*/
if (flags & TCL_LEAVE_ERR_MSG) {
TclObjVarErrMsg(interp, part1Ptr, part2Ptr, msg,
needArray, -1);
noSuchVar, -1);
}
return NULL;
}
part2 = newPart2 = part1Ptr->internalRep.twoPtrValue.ptr2;
if (newPart2) {
part2Ptr = Tcl_NewStringObj(newPart2, -1);
Tcl_IncrRefCount(part2Ptr);
|
627
628
629
630
631
632
633
634
635
636
637
638
639
640
|
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
|
+
|
for (i = 0; i < len1; i++) {
if (*(part1 + i) == '(') {
if (part2Ptr != NULL) {
if (flags & TCL_LEAVE_ERR_MSG) {
TclObjVarErrMsg(interp, part1Ptr, part2Ptr, msg,
needArray, -1);
}
return NULL;
}
/*
* part1Ptr points to an array element; first copy the element
* name to a new string part2.
*/
|