Tcl Source Code

Hex Artifact Content
Login

Artifact e14a422659f0d0a8320894b7698db5aa30186989:

Attachment "1706140-2.patch" to ticket [1706140fff] added by msofer 2007-05-04 12:50:25.
0000: 49 6e 64 65 78 3a 20 67 65 6e 65 72 69 63 2f 74  Index: generic/t
0010: 63 6c 4c 69 6e 6b 2e 63 0a 3d 3d 3d 3d 3d 3d 3d  clLink.c.=======
0020: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0030: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0040: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0050: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 0a 52 43 53  ============.RCS
0060: 20 66 69 6c 65 3a 20 2f 63 76 73 72 6f 6f 74 2f   file: /cvsroot/
0070: 74 63 6c 2f 74 63 6c 2f 67 65 6e 65 72 69 63 2f  tcl/tcl/generic/
0080: 74 63 6c 4c 69 6e 6b 2e 63 2c 76 0a 72 65 74 72  tclLink.c,v.retr
0090: 69 65 76 69 6e 67 20 72 65 76 69 73 69 6f 6e 20  ieving revision 
00a0: 31 2e 32 31 0a 64 69 66 66 20 2d 75 20 2d 72 31  1.21.diff -u -r1
00b0: 2e 32 31 20 74 63 6c 4c 69 6e 6b 2e 63 0a 2d 2d  .21 tclLink.c.--
00c0: 2d 20 67 65 6e 65 72 69 63 2f 74 63 6c 4c 69 6e  - generic/tclLin
00d0: 6b 2e 63 09 31 30 20 41 70 72 20 32 30 30 37 20  k.c.10 Apr 2007 
00e0: 31 34 3a 34 37 3a 31 36 20 2d 30 30 30 30 09 31  14:47:16 -0000.1
00f0: 2e 32 31 0a 2b 2b 2b 20 67 65 6e 65 72 69 63 2f  .21.+++ generic/
0100: 74 63 6c 4c 69 6e 6b 2e 63 09 34 20 4d 61 79 20  tclLink.c.4 May 
0110: 32 30 30 37 20 30 35 3a 34 34 3a 32 31 20 2d 30  2007 05:44:21 -0
0120: 30 30 30 0a 40 40 20 2d 32 36 32 2c 37 20 2b 32  000.@@ -262,7 +2
0130: 36 32 2c 37 20 40 40 0a 20 20 20 20 20 20 2a 2f  62,7 @@.      */
0140: 0a 20 0a 20 20 20 20 20 69 66 20 28 66 6c 61 67  . .     if (flag
0150: 73 20 26 20 54 43 4c 5f 54 52 41 43 45 5f 55 4e  s & TCL_TRACE_UN
0160: 53 45 54 53 29 20 7b 0a 2d 09 69 66 20 28 66 6c  SETS) {.-.if (fl
0170: 61 67 73 20 26 20 54 43 4c 5f 49 4e 54 45 52 50  ags & TCL_INTERP
0180: 5f 44 45 53 54 52 4f 59 45 44 29 20 7b 0a 2b 09  _DESTROYED) {.+.
0190: 69 66 20 28 54 63 6c 5f 49 6e 74 65 72 70 44 65  if (Tcl_InterpDe
01a0: 6c 65 74 65 64 28 69 6e 74 65 72 70 29 29 20 7b  leted(interp)) {
01b0: 0a 20 09 20 20 20 20 54 63 6c 5f 44 65 63 72 52  . .    Tcl_DecrR
01c0: 65 66 43 6f 75 6e 74 28 6c 69 6e 6b 50 74 72 2d  efCount(linkPtr-
01d0: 3e 76 61 72 4e 61 6d 65 29 3b 0a 20 09 20 20 20  >varName);. .   
01e0: 20 63 6b 66 72 65 65 28 28 63 68 61 72 20 2a 29   ckfree((char *)
01f0: 20 6c 69 6e 6b 50 74 72 29 3b 0a 20 09 7d 20 65   linkPtr);. .} e
0200: 6c 73 65 20 69 66 20 28 66 6c 61 67 73 20 26 20  lse if (flags & 
0210: 54 43 4c 5f 54 52 41 43 45 5f 44 45 53 54 52 4f  TCL_TRACE_DESTRO
0220: 59 45 44 29 20 7b 0a 49 6e 64 65 78 3a 20 67 65  YED) {.Index: ge
0230: 6e 65 72 69 63 2f 74 63 6c 4e 61 6d 65 73 70 2e  neric/tclNamesp.
0240: 63 0a 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  c.==============
0250: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0260: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0270: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0280: 3d 3d 3d 3d 3d 0a 52 43 53 20 66 69 6c 65 3a 20  =====.RCS file: 
0290: 2f 63 76 73 72 6f 6f 74 2f 74 63 6c 2f 74 63 6c  /cvsroot/tcl/tcl
02a0: 2f 67 65 6e 65 72 69 63 2f 74 63 6c 4e 61 6d 65  /generic/tclName
02b0: 73 70 2e 63 2c 76 0a 72 65 74 72 69 65 76 69 6e  sp.c,v.retrievin
02c0: 67 20 72 65 76 69 73 69 6f 6e 20 31 2e 31 33 33  g revision 1.133
02d0: 0a 64 69 66 66 20 2d 75 20 2d 72 31 2e 31 33 33  .diff -u -r1.133
02e0: 20 74 63 6c 4e 61 6d 65 73 70 2e 63 0a 2d 2d 2d   tclNamesp.c.---
02f0: 20 67 65 6e 65 72 69 63 2f 74 63 6c 4e 61 6d 65   generic/tclName
0300: 73 70 2e 63 09 32 34 20 41 70 72 20 32 30 30 37  sp.c.24 Apr 2007
0310: 20 31 37 3a 35 30 3a 35 33 20 2d 30 30 30 30 09   17:50:53 -0000.
0320: 31 2e 31 33 33 0a 2b 2b 2b 20 67 65 6e 65 72 69  1.133.+++ generi
0330: 63 2f 74 63 6c 4e 61 6d 65 73 70 2e 63 09 34 20  c/tclNamesp.c.4 
0340: 4d 61 79 20 32 30 30 37 20 30 35 3a 34 34 3a 32  May 2007 05:44:2
0350: 34 20 2d 30 30 30 30 0a 40 40 20 2d 36 32 32 2c  4 -0000.@@ -622,
0360: 37 20 2b 36 32 32 2c 37 20 40 40 0a 20 7b 0a 20  7 +622,7 @@. {. 
0370: 20 20 20 20 49 6e 74 65 72 70 20 2a 69 50 74 72      Interp *iPtr
0380: 20 3d 20 28 49 6e 74 65 72 70 20 2a 29 69 6e 74   = (Interp *)int
0390: 65 72 70 3b 0a 20 0a 2d 20 20 20 20 69 66 20 28  erp;. .-    if (
03a0: 66 6c 61 67 73 20 26 20 54 43 4c 5f 49 4e 54 45  flags & TCL_INTE
03b0: 52 50 5f 44 45 53 54 52 4f 59 45 44 29 20 7b 0a  RP_DESTROYED) {.
03c0: 2b 20 20 20 20 69 66 20 28 54 63 6c 5f 49 6e 74  +    if (Tcl_Int
03d0: 65 72 70 44 65 6c 65 74 65 64 28 69 6e 74 65 72  erpDeleted(inter
03e0: 70 29 29 20 7b 0a 20 09 72 65 74 75 72 6e 20 4e  p)) {. .return N
03f0: 55 4c 4c 3b 0a 20 20 20 20 20 7d 0a 20 20 20 20  ULL;.     }.    
0400: 20 69 66 20 28 69 50 74 72 2d 3e 65 72 72 6f 72   if (iPtr->error
0410: 43 6f 64 65 29 20 7b 0a 40 40 20 2d 36 39 36 2c  Code) {.@@ -696,
0420: 37 20 2b 36 39 36 2c 37 20 40 40 0a 20 7b 0a 20  7 +696,7 @@. {. 
0430: 20 20 20 20 49 6e 74 65 72 70 20 2a 69 50 74 72      Interp *iPtr
0440: 20 3d 20 28 49 6e 74 65 72 70 20 2a 29 69 6e 74   = (Interp *)int
0450: 65 72 70 3b 0a 20 0a 2d 20 20 20 20 69 66 20 28  erp;. .-    if (
0460: 66 6c 61 67 73 20 26 20 54 43 4c 5f 49 4e 54 45  flags & TCL_INTE
0470: 52 50 5f 44 45 53 54 52 4f 59 45 44 29 20 7b 0a  RP_DESTROYED) {.
0480: 2b 20 20 20 20 69 66 20 28 54 63 6c 5f 49 6e 74  +    if (Tcl_Int
0490: 65 72 70 44 65 6c 65 74 65 64 28 69 6e 74 65 72  erpDeleted(inter
04a0: 70 29 29 20 7b 0a 20 09 72 65 74 75 72 6e 20 4e  p)) {. .return N
04b0: 55 4c 4c 3b 0a 20 20 20 20 20 7d 0a 20 20 20 20  ULL;.     }.    
04c0: 20 69 66 20 28 69 50 74 72 2d 3e 65 72 72 6f 72   if (iPtr->error
04d0: 49 6e 66 6f 29 20 7b 0a 49 6e 64 65 78 3a 20 67  Info) {.Index: g
04e0: 65 6e 65 72 69 63 2f 74 63 6c 54 72 61 63 65 2e  eneric/tclTrace.
04f0: 63 0a 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  c.==============
0500: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0510: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0520: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0530: 3d 3d 3d 3d 3d 0a 52 43 53 20 66 69 6c 65 3a 20  =====.RCS file: 
0540: 2f 63 76 73 72 6f 6f 74 2f 74 63 6c 2f 74 63 6c  /cvsroot/tcl/tcl
0550: 2f 67 65 6e 65 72 69 63 2f 74 63 6c 54 72 61 63  /generic/tclTrac
0560: 65 2e 63 2c 76 0a 72 65 74 72 69 65 76 69 6e 67  e.c,v.retrieving
0570: 20 72 65 76 69 73 69 6f 6e 20 31 2e 33 36 0a 64   revision 1.36.d
0580: 69 66 66 20 2d 75 20 2d 72 31 2e 33 36 20 74 63  iff -u -r1.36 tc
0590: 6c 54 72 61 63 65 2e 63 0a 2d 2d 2d 20 67 65 6e  lTrace.c.--- gen
05a0: 65 72 69 63 2f 74 63 6c 54 72 61 63 65 2e 63 09  eric/tclTrace.c.
05b0: 31 30 20 41 70 72 20 32 30 30 37 20 31 34 3a 34  10 Apr 2007 14:4
05c0: 37 3a 31 37 20 2d 30 30 30 30 09 31 2e 33 36 0a  7:17 -0000.1.36.
05d0: 2b 2b 2b 20 67 65 6e 65 72 69 63 2f 74 63 6c 54  +++ generic/tclT
05e0: 72 61 63 65 2e 63 09 34 20 4d 61 79 20 32 30 30  race.c.4 May 200
05f0: 37 20 30 35 3a 34 34 3a 32 36 20 2d 30 30 30 30  7 05:44:26 -0000
0600: 0a 40 40 20 2d 31 32 36 39 2c 37 20 2b 31 32 36  .@@ -1269,7 +126
0610: 39 2c 37 20 40 40 0a 20 0a 20 20 20 20 20 74 63  9,7 @@. .     tc
0620: 6d 64 50 74 72 2d 3e 72 65 66 43 6f 75 6e 74 2b  mdPtr->refCount+
0630: 2b 3b 0a 20 0a 2d 20 20 20 20 69 66 20 28 28 74  +;. .-    if ((t
0640: 63 6d 64 50 74 72 2d 3e 66 6c 61 67 73 20 26 20  cmdPtr->flags & 
0650: 66 6c 61 67 73 29 20 26 26 20 21 28 66 6c 61 67  flags) && !(flag
0660: 73 20 26 20 54 43 4c 5f 49 4e 54 45 52 50 5f 44  s & TCL_INTERP_D
0670: 45 53 54 52 4f 59 45 44 29 0a 2b 20 20 20 20 69  ESTROYED).+    i
0680: 66 20 28 28 74 63 6d 64 50 74 72 2d 3e 66 6c 61  f ((tcmdPtr->fla
0690: 67 73 20 26 20 66 6c 61 67 73 29 20 26 26 20 21  gs & flags) && !
06a0: 54 63 6c 5f 49 6e 74 65 72 70 44 65 6c 65 74 65  Tcl_InterpDelete
06b0: 64 28 69 6e 74 65 72 70 29 0a 20 09 20 20 20 20  d(interp). .    
06c0: 26 26 20 21 54 63 6c 5f 4c 69 6d 69 74 45 78 63  && !Tcl_LimitExc
06d0: 65 65 64 65 64 28 69 6e 74 65 72 70 29 29 20 7b  eeded(interp)) {
06e0: 0a 20 09 2f 2a 0a 20 09 20 2a 20 47 65 6e 65 72  . ./*. . * Gener
06f0: 61 74 65 20 61 20 63 6f 6d 6d 61 6e 64 20 74 6f  ate a command to
0700: 20 65 78 65 63 75 74 65 20 62 79 20 61 70 70 65   execute by appe
0710: 6e 64 69 6e 67 20 6c 69 73 74 20 65 6c 65 6d 65  nding list eleme
0720: 6e 74 73 20 66 6f 72 20 74 68 65 0a 40 40 20 2d  nts for the.@@ -
0730: 31 37 35 30 2c 37 20 2b 31 37 35 30 2c 37 20 40  1750,7 +1750,7 @
0740: 40 0a 20 09 72 65 74 75 72 6e 20 74 72 61 63 65  @. .return trace
0750: 43 6f 64 65 3b 0a 20 20 20 20 20 7d 0a 20 0a 2d  Code;.     }. .-
0760: 20 20 20 20 69 66 20 28 21 28 66 6c 61 67 73 20      if (!(flags 
0770: 26 20 54 43 4c 5f 49 4e 54 45 52 50 5f 44 45 53  & TCL_INTERP_DES
0780: 54 52 4f 59 45 44 29 20 26 26 20 21 54 63 6c 5f  TROYED) && !Tcl_
0790: 4c 69 6d 69 74 45 78 63 65 65 64 65 64 28 69 6e  LimitExceeded(in
07a0: 74 65 72 70 29 29 20 7b 0a 2b 20 20 20 20 69 66  terp)) {.+    if
07b0: 20 28 21 54 63 6c 5f 49 6e 74 65 72 70 44 65 6c   (!Tcl_InterpDel
07c0: 65 74 65 64 28 69 6e 74 65 72 70 29 20 26 26 20  eted(interp) && 
07d0: 21 54 63 6c 5f 4c 69 6d 69 74 45 78 63 65 65 64  !Tcl_LimitExceed
07e0: 65 64 28 69 6e 74 65 72 70 29 29 20 7b 0a 20 09  ed(interp)) {. .
07f0: 2f 2a 0a 20 09 20 2a 20 43 68 65 63 6b 20 77 68  /*. . * Check wh
0800: 65 74 68 65 72 20 74 68 65 20 63 75 72 72 65 6e  ether the curren
0810: 74 20 63 61 6c 6c 20 69 73 20 67 6f 69 6e 67 20  t call is going 
0820: 74 6f 20 65 76 61 6c 20 61 72 62 69 74 72 61 72  to eval arbitrar
0830: 79 20 54 63 6c 20 63 6f 64 65 0a 20 09 20 2a 20  y Tcl code. . * 
0840: 77 69 74 68 20 61 20 67 65 6e 65 72 61 74 65 64  with a generated
0850: 20 74 72 61 63 65 2c 20 6f 72 20 77 68 65 74 68   trace, or wheth
0860: 65 72 20 77 65 20 61 72 65 20 6f 6e 6c 79 20 67  er we are only g
0870: 6f 69 6e 67 20 74 6f 20 73 65 74 75 70 0a 40 40  oing to setup.@@
0880: 20 2d 31 39 35 38 2c 37 20 2b 31 39 35 38 2c 37   -1958,7 +1958,7
0890: 20 40 40 0a 20 20 20 20 20 20 2a 2f 0a 20 0a 20   @@.      */. . 
08a0: 20 20 20 20 72 65 73 75 6c 74 20 3d 20 4e 55 4c      result = NUL
08b0: 4c 3b 0a 2d 20 20 20 20 69 66 20 28 28 74 76 61  L;.-    if ((tva
08c0: 72 50 74 72 2d 3e 66 6c 61 67 73 20 26 20 66 6c  rPtr->flags & fl
08d0: 61 67 73 29 20 26 26 20 21 28 66 6c 61 67 73 20  ags) && !(flags 
08e0: 26 20 54 43 4c 5f 49 4e 54 45 52 50 5f 44 45 53  & TCL_INTERP_DES
08f0: 54 52 4f 59 45 44 29 0a 2b 20 20 20 20 69 66 20  TROYED).+    if 
0900: 28 28 74 76 61 72 50 74 72 2d 3e 66 6c 61 67 73  ((tvarPtr->flags
0910: 20 26 20 66 6c 61 67 73 29 20 26 26 20 21 54 63   & flags) && !Tc
0920: 6c 5f 49 6e 74 65 72 70 44 65 6c 65 74 65 64 28  l_InterpDeleted(
0930: 69 6e 74 65 72 70 29 0a 20 09 20 20 20 20 26 26  interp). .    &&
0940: 20 21 54 63 6c 5f 4c 69 6d 69 74 45 78 63 65 65   !Tcl_LimitExcee
0950: 64 65 64 28 69 6e 74 65 72 70 29 29 20 7b 0a 20  ded(interp)) {. 
0960: 09 69 66 20 28 74 76 61 72 50 74 72 2d 3e 6c 65  .if (tvarPtr->le
0970: 6e 67 74 68 20 21 3d 20 28 73 69 7a 65 5f 74 29  ngth != (size_t)
0980: 20 30 29 20 7b 0a 20 09 20 20 20 20 2f 2a 0a 40   0) {. .    /*.@
0990: 40 20 2d 32 34 35 37 2c 31 30 20 2b 32 34 35 37  @ -2457,10 +2457
09a0: 2c 38 20 40 40 0a 20 20 20 20 20 43 4f 4e 53 54  ,8 @@.     CONST
09b0: 20 63 68 61 72 20 2a 70 61 72 74 31 2c 0a 20 20   char *part1,.  
09c0: 20 20 20 43 4f 4e 53 54 20 63 68 61 72 20 2a 70     CONST char *p
09d0: 61 72 74 32 2c 09 09 2f 2a 20 56 61 72 69 61 62  art2,../* Variab
09e0: 6c 65 27 73 20 74 77 6f 2d 70 61 72 74 20 6e 61  le's two-part na
09f0: 6d 65 2e 20 2a 2f 0a 20 20 20 20 20 69 6e 74 20  me. */.     int 
0a00: 66 6c 61 67 73 2c 09 09 09 2f 2a 20 46 6c 61 67  flags,.../* Flag
0a10: 73 20 70 61 73 73 65 64 20 74 6f 20 74 72 61 63  s passed to trac
0a20: 65 20 66 75 6e 63 74 69 6f 6e 73 3a 20 69 6e 64  e functions: ind
0a30: 69 63 61 74 65 73 0a 2d 09 09 09 09 20 2a 20 77  icates.-.... * w
0a40: 68 61 74 27 73 20 68 61 70 70 65 6e 69 6e 67 20  hat's happening 
0a50: 74 6f 20 76 61 72 69 61 62 6c 65 2c 20 70 6c 75  to variable, plu
0a60: 73 20 6f 74 68 65 72 0a 2d 09 09 09 09 20 2a 20  s other.-.... * 
0a70: 73 74 75 66 66 20 6c 69 6b 65 20 54 43 4c 5f 47  stuff like TCL_G
0a80: 4c 4f 42 41 4c 5f 4f 4e 4c 59 2c 0a 2d 09 09 09  LOBAL_ONLY,.-...
0a90: 09 20 2a 20 54 43 4c 5f 4e 41 4d 45 53 50 41 43  . * TCL_NAMESPAC
0aa0: 45 5f 4f 4e 4c 59 2c 20 61 6e 64 0a 2d 09 09 09  E_ONLY, and.-...
0ab0: 09 20 2a 20 54 43 4c 5f 49 4e 54 45 52 50 5f 44  . * TCL_INTERP_D
0ac0: 45 53 54 52 4f 59 45 44 2e 20 2a 2f 0a 2b 09 09  ESTROYED. */.+..
0ad0: 09 09 20 2a 20 77 68 61 74 27 73 20 68 61 70 70  .. * what's happ
0ae0: 65 6e 69 6e 67 20 74 6f 20 76 61 72 69 61 62 6c  ening to variabl
0af0: 65 2c 20 70 6c 75 73 20 6d 61 79 62 65 0a 2b 09  e, plus maybe.+.
0b00: 09 09 09 20 2a 20 54 43 4c 5f 47 4c 4f 42 41 4c  ... * TCL_GLOBAL
0b10: 5f 4f 4e 4c 59 20 6f 72 20 54 43 4c 5f 4e 41 4d  _ONLY or TCL_NAM
0b20: 45 53 50 41 43 45 5f 4f 4e 4c 59 20 2a 2f 0a 20  ESPACE_ONLY */. 
0b30: 20 20 20 20 69 6e 74 20 6c 65 61 76 65 45 72 72      int leaveErr
0b40: 4d 73 67 29 09 09 2f 2a 20 49 66 20 74 72 75 65  Msg)../* If true
0b50: 2c 20 61 6e 64 20 6f 6e 65 20 6f 66 20 74 68 65  , and one of the
0b60: 20 74 72 61 63 65 73 20 69 6e 64 69 63 61 74 65   traces indicate
0b70: 73 20 61 6e 0a 20 09 09 09 09 20 2a 20 65 72 72  s an. .... * err
0b80: 6f 72 2c 20 74 68 65 6e 20 6c 65 61 76 65 20 61  or, then leave a
0b90: 6e 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 20  n error message 
0ba0: 61 6e 64 0a 20 09 09 09 09 20 2a 20 73 74 61 63  and. .... * stac
0bb0: 6b 20 74 72 61 63 65 20 69 6e 66 6f 72 6d 61 74  k trace informat
0bc0: 69 6f 6e 20 69 6e 20 2a 69 50 54 72 2e 20 2a 2f  ion in *iPTr. */
0bd0: 0a 40 40 20 2d 32 35 34 33 2c 36 20 2b 32 35 34  .@@ -2543,6 +254
0be0: 31 2c 39 20 40 40 0a 20 09 20 20 20 20 69 66 20  1,9 @@. .    if 
0bf0: 28 73 74 61 74 65 20 3d 3d 20 4e 55 4c 4c 29 20  (state == NULL) 
0c00: 7b 0a 20 09 09 73 74 61 74 65 20 3d 20 54 63 6c  {. ..state = Tcl
0c10: 5f 53 61 76 65 49 6e 74 65 72 70 53 74 61 74 65  _SaveInterpState
0c20: 28 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a 29 69  ((Tcl_Interp *)i
0c30: 50 74 72 2c 20 63 6f 64 65 29 3b 0a 20 09 20 20  Ptr, code);. .  
0c40: 20 20 7d 0a 2b 09 20 20 20 20 69 66 20 28 54 63    }.+.    if (Tc
0c50: 6c 5f 49 6e 74 65 72 70 44 65 6c 65 74 65 64 28  l_InterpDeleted(
0c60: 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a 29 69 50  (Tcl_Interp *)iP
0c70: 74 72 29 29 20 7b 0a 2b 09 09 66 6c 61 67 73 20  tr)) {.+..flags 
0c80: 7c 3d 20 54 43 4c 5f 49 4e 54 45 52 50 5f 44 45  |= TCL_INTERP_DE
0c90: 53 54 52 4f 59 45 44 3b 0a 2b 09 20 20 20 20 7d  STROYED;.+.    }
0ca0: 0a 20 09 20 20 20 20 72 65 73 75 6c 74 20 3d 20  . .    result = 
0cb0: 28 2a 74 72 61 63 65 50 74 72 2d 3e 74 72 61 63  (*tracePtr->trac
0cc0: 65 50 72 6f 63 29 28 74 72 61 63 65 50 74 72 2d  eProc)(tracePtr-
0cd0: 3e 63 6c 69 65 6e 74 44 61 74 61 2c 0a 20 09 09  >clientData,. ..
0ce0: 20 20 20 20 28 54 63 6c 5f 49 6e 74 65 72 70 20      (Tcl_Interp 
0cf0: 2a 29 20 69 50 74 72 2c 20 70 61 72 74 31 2c 20  *) iPtr, part1, 
0d00: 70 61 72 74 32 2c 20 66 6c 61 67 73 29 3b 0a 20  part2, flags);. 
0d10: 09 20 20 20 20 69 66 20 28 72 65 73 75 6c 74 20  .    if (result 
0d20: 21 3d 20 4e 55 4c 4c 29 20 7b 0a 40 40 20 2d 32  != NULL) {.@@ -2
0d30: 35 38 32 2c 36 20 2b 32 35 38 33 2c 39 20 40 40  582,6 +2583,9 @@
0d40: 0a 20 09 69 66 20 28 73 74 61 74 65 20 3d 3d 20  . .if (state == 
0d50: 4e 55 4c 4c 29 20 7b 0a 20 09 20 20 20 20 73 74  NULL) {. .    st
0d60: 61 74 65 20 3d 20 54 63 6c 5f 53 61 76 65 49 6e  ate = Tcl_SaveIn
0d70: 74 65 72 70 53 74 61 74 65 28 28 54 63 6c 5f 49  terpState((Tcl_I
0d80: 6e 74 65 72 70 20 2a 29 69 50 74 72 2c 20 63 6f  nterp *)iPtr, co
0d90: 64 65 29 3b 0a 20 09 7d 0a 2b 09 69 66 20 28 54  de);. .}.+.if (T
0da0: 63 6c 5f 49 6e 74 65 72 70 44 65 6c 65 74 65 64  cl_InterpDeleted
0db0: 28 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a 29 69  ((Tcl_Interp *)i
0dc0: 50 74 72 29 29 20 7b 0a 2b 09 20 20 20 20 66 6c  Ptr)) {.+.    fl
0dd0: 61 67 73 20 7c 3d 20 54 43 4c 5f 49 4e 54 45 52  ags |= TCL_INTER
0de0: 50 5f 44 45 53 54 52 4f 59 45 44 3b 0a 2b 09 7d  P_DESTROYED;.+.}
0df0: 0a 20 09 72 65 73 75 6c 74 20 3d 20 28 2a 74 72  . .result = (*tr
0e00: 61 63 65 50 74 72 2d 3e 74 72 61 63 65 50 72 6f  acePtr->tracePro
0e10: 63 29 28 74 72 61 63 65 50 74 72 2d 3e 63 6c 69  c)(tracePtr->cli
0e20: 65 6e 74 44 61 74 61 2c 0a 20 09 09 28 54 63 6c  entData,. ..(Tcl
0e30: 5f 49 6e 74 65 72 70 20 2a 29 20 69 50 74 72 2c  _Interp *) iPtr,
0e40: 20 70 61 72 74 31 2c 20 70 61 72 74 32 2c 20 66   part1, part2, f
0e50: 6c 61 67 73 29 3b 0a 20 09 69 66 20 28 72 65 73  lags);. .if (res
0e60: 75 6c 74 20 21 3d 20 4e 55 4c 4c 29 20 7b 0a 49  ult != NULL) {.I
0e70: 6e 64 65 78 3a 20 67 65 6e 65 72 69 63 2f 74 63  ndex: generic/tc
0e80: 6c 55 74 69 6c 2e 63 0a 3d 3d 3d 3d 3d 3d 3d 3d  lUtil.c.========
0e90: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0ea0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0eb0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0ec0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 0a 52 43 53 20  ===========.RCS 
0ed0: 66 69 6c 65 3a 20 2f 63 76 73 72 6f 6f 74 2f 74  file: /cvsroot/t
0ee0: 63 6c 2f 74 63 6c 2f 67 65 6e 65 72 69 63 2f 74  cl/tcl/generic/t
0ef0: 63 6c 55 74 69 6c 2e 63 2c 76 0a 72 65 74 72 69  clUtil.c,v.retri
0f00: 65 76 69 6e 67 20 72 65 76 69 73 69 6f 6e 20 31  eving revision 1
0f10: 2e 38 31 0a 64 69 66 66 20 2d 75 20 2d 72 31 2e  .81.diff -u -r1.
0f20: 38 31 20 74 63 6c 55 74 69 6c 2e 63 0a 2d 2d 2d  81 tclUtil.c.---
0f30: 20 67 65 6e 65 72 69 63 2f 74 63 6c 55 74 69 6c   generic/tclUtil
0f40: 2e 63 09 32 31 20 4d 61 72 20 32 30 30 37 20 31  .c.21 Mar 2007 1
0f50: 38 3a 30 32 3a 35 31 20 2d 30 30 30 30 09 31 2e  8:02:51 -0000.1.
0f60: 38 31 0a 2b 2b 2b 20 67 65 6e 65 72 69 63 2f 74  81.+++ generic/t
0f70: 63 6c 55 74 69 6c 2e 63 09 34 20 4d 61 79 20 32  clUtil.c.4 May 2
0f80: 30 30 37 20 30 35 3a 34 34 3a 32 37 20 2d 30 30  007 05:44:27 -00
0f90: 30 30 0a 40 40 20 2d 32 31 34 33 2c 37 20 2b 32  00.@@ -2143,7 +2
0fa0: 31 34 33 2c 37 20 40 40 0a 20 20 20 20 20 20 2a  143,7 @@.      *
0fb0: 2f 0a 20 0a 20 20 20 20 20 69 66 20 28 66 6c 61  /. .     if (fla
0fc0: 67 73 20 26 20 54 43 4c 5f 54 52 41 43 45 5f 55  gs & TCL_TRACE_U
0fd0: 4e 53 45 54 53 29 20 7b 0a 2d 09 69 66 20 28 28  NSETS) {.-.if ((
0fe0: 66 6c 61 67 73 20 26 20 54 43 4c 5f 54 52 41 43  flags & TCL_TRAC
0ff0: 45 5f 44 45 53 54 52 4f 59 45 44 29 20 26 26 20  E_DESTROYED) && 
1000: 21 28 66 6c 61 67 73 20 26 20 54 43 4c 5f 49 4e  !(flags & TCL_IN
1010: 54 45 52 50 5f 44 45 53 54 52 4f 59 45 44 29 29  TERP_DESTROYED))
1020: 20 7b 0a 2b 09 69 66 20 28 28 66 6c 61 67 73 20   {.+.if ((flags 
1030: 26 20 54 43 4c 5f 54 52 41 43 45 5f 44 45 53 54  & TCL_TRACE_DEST
1040: 52 4f 59 45 44 29 20 26 26 20 21 54 63 6c 5f 49  ROYED) && !Tcl_I
1050: 6e 74 65 72 70 44 65 6c 65 74 65 64 28 69 6e 74  nterpDeleted(int
1060: 65 72 70 29 29 20 7b 0a 20 09 20 20 20 20 54 63  erp)) {. .    Tc
1070: 6c 5f 54 72 61 63 65 56 61 72 32 28 69 6e 74 65  l_TraceVar2(inte
1080: 72 70 2c 20 6e 61 6d 65 31 2c 20 6e 61 6d 65 32  rp, name1, name2
1090: 2c 0a 20 09 09 20 20 20 20 54 43 4c 5f 47 4c 4f  ,. ..    TCL_GLO
10a0: 42 41 4c 5f 4f 4e 4c 59 7c 54 43 4c 5f 54 52 41  BAL_ONLY|TCL_TRA
10b0: 43 45 5f 52 45 41 44 53 7c 54 43 4c 5f 54 52 41  CE_READS|TCL_TRA
10c0: 43 45 5f 57 52 49 54 45 53 0a 20 09 09 20 20 20  CE_WRITES. ..   
10d0: 20 7c 54 43 4c 5f 54 52 41 43 45 5f 55 4e 53 45   |TCL_TRACE_UNSE
10e0: 54 53 2c 20 54 63 6c 50 72 65 63 54 72 61 63 65  TS, TclPrecTrace
10f0: 50 72 6f 63 2c 20 63 6c 69 65 6e 74 44 61 74 61  Proc, clientData
1100: 29 3b 0a 49 6e 64 65 78 3a 20 67 65 6e 65 72 69  );.Index: generi
1110: 63 2f 74 63 6c 56 61 72 2e 63 0a 3d 3d 3d 3d 3d  c/tclVar.c.=====
1120: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
1130: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
1140: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
1150: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 0a 52  ==============.R
1160: 43 53 20 66 69 6c 65 3a 20 2f 63 76 73 72 6f 6f  CS file: /cvsroo
1170: 74 2f 74 63 6c 2f 74 63 6c 2f 67 65 6e 65 72 69  t/tcl/tcl/generi
1180: 63 2f 74 63 6c 56 61 72 2e 63 2c 76 0a 72 65 74  c/tclVar.c,v.ret
1190: 72 69 65 76 69 6e 67 20 72 65 76 69 73 69 6f 6e  rieving revision
11a0: 20 31 2e 31 33 33 0a 64 69 66 66 20 2d 75 20 2d   1.133.diff -u -
11b0: 72 31 2e 31 33 33 20 74 63 6c 56 61 72 2e 63 0a  r1.133 tclVar.c.
11c0: 2d 2d 2d 20 67 65 6e 65 72 69 63 2f 74 63 6c 56  --- generic/tclV
11d0: 61 72 2e 63 09 32 20 4d 61 79 20 32 30 30 37 20  ar.c.2 May 2007 
11e0: 30 30 3a 33 31 3a 32 32 20 2d 30 30 30 30 09 31  00:31:22 -0000.1
11f0: 2e 31 33 33 0a 2b 2b 2b 20 67 65 6e 65 72 69 63  .133.+++ generic
1200: 2f 74 63 6c 56 61 72 2e 63 09 34 20 4d 61 79 20  /tclVar.c.4 May 
1210: 32 30 30 37 20 30 35 3a 34 34 3a 33 30 20 2d 30  2007 05:44:30 -0
1220: 30 30 30 0a 40 40 20 2d 31 30 39 37 2c 31 35 20  000.@@ -1097,15 
1230: 2b 31 30 39 37 2c 31 30 20 40 40 0a 20 7b 0a 20  +1097,10 @@. {. 
1240: 20 20 20 20 56 61 72 20 2a 76 61 72 50 74 72 2c      Var *varPtr,
1250: 20 2a 61 72 72 61 79 50 74 72 3b 0a 20 0a 2d 20   *arrayPtr;. .- 
1260: 20 20 20 2f 2a 0a 2d 20 20 20 20 20 2a 20 57 65     /*.-     * We
1270: 20 6e 65 65 64 20 61 20 73 70 65 63 69 61 6c 20   need a special 
1280: 66 6c 61 67 20 63 68 65 63 6b 20 74 6f 20 73 65  flag check to se
1290: 65 20 69 66 20 77 65 20 77 61 6e 74 20 74 6f 20  e if we want to 
12a0: 63 72 65 61 74 65 20 70 61 72 74 20 31 2c 0a 2d  create part 1,.-
12b0: 20 20 20 20 20 2a 20 62 65 63 61 75 73 65 20 63       * because c
12c0: 6f 6d 6d 61 6e 64 73 20 6c 69 6b 65 20 6c 61 70  ommands like lap
12d0: 70 65 6e 64 20 72 65 71 75 69 72 65 20 72 65 61  pend require rea
12e0: 64 20 74 72 61 63 65 73 20 74 6f 20 74 72 69 67  d traces to trig
12f0: 67 65 72 20 66 6f 72 0a 2d 20 20 20 20 20 2a 20  ger for.-     * 
1300: 70 72 65 76 69 6f 75 73 6c 79 20 6e 6f 6e 2d 65  previously non-e
1310: 78 69 73 74 65 6e 74 20 76 61 6c 75 65 73 2e 0a  xistent values..
1320: 2d 20 20 20 20 20 2a 2f 0a 2d 0a 2b 20 20 20 20  -     */.-.+    
1330: 2f 2a 20 46 69 6c 74 65 72 20 74 6f 20 70 61 73  /* Filter to pas
1340: 73 20 74 68 72 6f 75 67 68 20 6f 6e 6c 79 20 74  s through only t
1350: 68 65 20 66 6c 61 67 73 20 74 68 69 73 20 69 6e  he flags this in
1360: 74 65 72 66 61 63 65 20 73 75 70 70 6f 72 74 73  terface supports
1370: 2e 20 2a 2f 0a 2b 20 20 20 20 66 6c 61 67 73 20  . */.+    flags 
1380: 26 3d 20 28 54 43 4c 5f 47 4c 4f 42 41 4c 5f 4f  &= (TCL_GLOBAL_O
1390: 4e 4c 59 7c 54 43 4c 5f 4e 41 4d 45 53 50 41 43  NLY|TCL_NAMESPAC
13a0: 45 5f 4f 4e 4c 59 7c 54 43 4c 5f 4c 45 41 56 45  E_ONLY|TCL_LEAVE
13b0: 5f 45 52 52 5f 4d 53 47 29 3b 0a 20 20 20 20 20  _ERR_MSG);.     
13c0: 76 61 72 50 74 72 20 3d 20 54 63 6c 4c 6f 6f 6b  varPtr = TclLook
13d0: 75 70 56 61 72 28 69 6e 74 65 72 70 2c 20 70 61  upVar(interp, pa
13e0: 72 74 31 2c 20 70 61 72 74 32 2c 20 66 6c 61 67  rt1, part2, flag
13f0: 73 2c 20 22 72 65 61 64 22 2c 0a 2d 09 20 20 20  s, "read",.-.   
1400: 20 2f 2a 63 72 65 61 74 65 50 61 72 74 31 2a 2f   /*createPart1*/
1410: 20 28 66 6c 61 67 73 20 26 20 54 43 4c 5f 54 52   (flags & TCL_TR
1420: 41 43 45 5f 52 45 41 44 53 29 2c 0a 2d 09 20 20  ACE_READS),.-.  
1430: 20 20 2f 2a 63 72 65 61 74 65 50 61 72 74 32 2a    /*createPart2*
1440: 2f 20 31 2c 20 26 61 72 72 61 79 50 74 72 29 3b  / 1, &arrayPtr);
1450: 0a 2b 09 20 20 20 20 2f 2a 63 72 65 61 74 65 50  .+.    /*createP
1460: 61 72 74 31 2a 2f 20 30 2c 20 2f 2a 63 72 65 61  art1*/ 0, /*crea
1470: 74 65 50 61 72 74 32 2a 2f 20 31 2c 20 26 61 72  tePart2*/ 1, &ar
1480: 72 61 79 50 74 72 29 3b 0a 20 20 20 20 20 69 66  rayPtr);.     if
1490: 20 28 76 61 72 50 74 72 20 3d 3d 20 4e 55 4c 4c   (varPtr == NULL
14a0: 29 20 7b 0a 20 09 72 65 74 75 72 6e 20 4e 55 4c  ) {. .return NUL
14b0: 4c 3b 0a 20 20 20 20 20 7d 0a 40 40 20 2d 31 31  L;.     }.@@ -11
14c0: 35 35 2c 31 35 20 2b 31 31 35 30 2c 31 30 20 40  55,15 +1150,10 @
14d0: 40 0a 20 20 20 20 20 70 61 72 74 31 20 3d 20 54  @.     part1 = T
14e0: 63 6c 47 65 74 53 74 72 69 6e 67 28 70 61 72 74  clGetString(part
14f0: 31 50 74 72 29 3b 0a 20 20 20 20 20 70 61 72 74  1Ptr);.     part
1500: 32 20 3d 20 28 28 70 61 72 74 32 50 74 72 20 3d  2 = ((part2Ptr =
1510: 3d 20 4e 55 4c 4c 29 20 3f 20 4e 55 4c 4c 20 3a  = NULL) ? NULL :
1520: 20 54 63 6c 47 65 74 53 74 72 69 6e 67 28 70 61   TclGetString(pa
1530: 72 74 32 50 74 72 29 29 3b 0a 20 0a 2d 20 20 20  rt2Ptr));. .-   
1540: 20 2f 2a 0a 2d 20 20 20 20 20 2a 20 57 65 20 6e   /*.-     * We n
1550: 65 65 64 20 61 20 73 70 65 63 69 61 6c 20 66 6c  eed a special fl
1560: 61 67 20 63 68 65 63 6b 20 74 6f 20 73 65 65 20  ag check to see 
1570: 69 66 20 77 65 20 77 61 6e 74 20 74 6f 20 63 72  if we want to cr
1580: 65 61 74 65 20 70 61 72 74 20 31 2c 0a 2d 20 20  eate part 1,.-  
1590: 20 20 20 2a 20 62 65 63 61 75 73 65 20 63 6f 6d     * because com
15a0: 6d 61 6e 64 73 20 6c 69 6b 65 20 6c 61 70 70 65  mands like lappe
15b0: 6e 64 20 72 65 71 75 69 72 65 20 72 65 61 64 20  nd require read 
15c0: 74 72 61 63 65 73 20 74 6f 20 74 72 69 67 67 65  traces to trigge
15d0: 72 20 66 6f 72 0a 2d 20 20 20 20 20 2a 20 70 72  r for.-     * pr
15e0: 65 76 69 6f 75 73 6c 79 20 6e 6f 6e 2d 65 78 69  eviously non-exi
15f0: 73 74 65 6e 74 20 76 61 6c 75 65 73 2e 0a 2d 20  stent values..- 
1600: 20 20 20 20 2a 2f 0a 2d 0a 2b 20 20 20 20 2f 2a      */.-.+    /*
1610: 20 46 69 6c 74 65 72 20 74 6f 20 70 61 73 73 20   Filter to pass 
1620: 74 68 72 6f 75 67 68 20 6f 6e 6c 79 20 74 68 65  through only the
1630: 20 66 6c 61 67 73 20 74 68 69 73 20 69 6e 74 65   flags this inte
1640: 72 66 61 63 65 20 73 75 70 70 6f 72 74 73 2e 20  rface supports. 
1650: 2a 2f 0a 2b 20 20 20 20 66 6c 61 67 73 20 26 3d  */.+    flags &=
1660: 20 28 54 43 4c 5f 47 4c 4f 42 41 4c 5f 4f 4e 4c   (TCL_GLOBAL_ONL
1670: 59 7c 54 43 4c 5f 4e 41 4d 45 53 50 41 43 45 5f  Y|TCL_NAMESPACE_
1680: 4f 4e 4c 59 7c 54 43 4c 5f 4c 45 41 56 45 5f 45  ONLY|TCL_LEAVE_E
1690: 52 52 5f 4d 53 47 29 3b 0a 20 20 20 20 20 76 61  RR_MSG);.     va
16a0: 72 50 74 72 20 3d 20 54 63 6c 4f 62 6a 4c 6f 6f  rPtr = TclObjLoo
16b0: 6b 75 70 56 61 72 28 69 6e 74 65 72 70 2c 20 70  kupVar(interp, p
16c0: 61 72 74 31 50 74 72 2c 20 70 61 72 74 32 2c 20  art1Ptr, part2, 
16d0: 66 6c 61 67 73 2c 20 22 72 65 61 64 22 2c 0a 2d  flags, "read",.-
16e0: 09 20 20 20 20 2f 2a 63 72 65 61 74 65 50 61 72  .    /*createPar
16f0: 74 31 2a 2f 20 28 66 6c 61 67 73 20 26 20 54 43  t1*/ (flags & TC
1700: 4c 5f 54 52 41 43 45 5f 52 45 41 44 53 29 2c 0a  L_TRACE_READS),.
1710: 2d 09 20 20 20 20 2f 2a 63 72 65 61 74 65 50 61  -.    /*createPa
1720: 72 74 32 2a 2f 20 31 2c 20 26 61 72 72 61 79 50  rt2*/ 1, &arrayP
1730: 74 72 29 3b 0a 2b 09 20 20 20 20 2f 2a 63 72 65  tr);.+.    /*cre
1740: 61 74 65 50 61 72 74 31 2a 2f 20 30 2c 20 2f 2a  atePart1*/ 0, /*
1750: 63 72 65 61 74 65 50 61 72 74 32 2a 2f 20 31 2c  createPart2*/ 1,
1760: 20 26 61 72 72 61 79 50 74 72 29 3b 0a 20 20 20   &arrayPtr);.   
1770: 20 20 69 66 20 28 76 61 72 50 74 72 20 3d 3d 20    if (varPtr == 
1780: 4e 55 4c 4c 29 20 7b 0a 20 09 72 65 74 75 72 6e  NULL) {. .return
1790: 20 4e 55 4c 4c 3b 0a 20 20 20 20 20 7d 0a 40 40   NULL;.     }.@@
17a0: 20 2d 31 34 35 33 2c 36 20 2b 31 34 34 33 2c 39   -1453,6 +1443,9
17b0: 20 40 40 0a 20 7b 0a 20 20 20 20 20 56 61 72 20   @@. {.     Var 
17c0: 2a 76 61 72 50 74 72 2c 20 2a 61 72 72 61 79 50  *varPtr, *arrayP
17d0: 74 72 3b 0a 20 0a 2b 20 20 20 20 2f 2a 20 46 69  tr;. .+    /* Fi
17e0: 6c 74 65 72 20 74 6f 20 70 61 73 73 20 74 68 72  lter to pass thr
17f0: 6f 75 67 68 20 6f 6e 6c 79 20 74 68 65 20 66 6c  ough only the fl
1800: 61 67 73 20 74 68 69 73 20 69 6e 74 65 72 66 61  ags this interfa
1810: 63 65 20 73 75 70 70 6f 72 74 73 2e 20 2a 2f 0a  ce supports. */.
1820: 2b 20 20 20 20 66 6c 61 67 73 20 26 3d 20 28 54  +    flags &= (T
1830: 43 4c 5f 47 4c 4f 42 41 4c 5f 4f 4e 4c 59 7c 54  CL_GLOBAL_ONLY|T
1840: 43 4c 5f 4e 41 4d 45 53 50 41 43 45 5f 4f 4e 4c  CL_NAMESPACE_ONL
1850: 59 7c 54 43 4c 5f 4c 45 41 56 45 5f 45 52 52 5f  Y|TCL_LEAVE_ERR_
1860: 4d 53 47 0a 2b 09 20 20 20 20 7c 54 43 4c 5f 41  MSG.+.    |TCL_A
1870: 50 50 45 4e 44 5f 56 41 4c 55 45 7c 54 43 4c 5f  PPEND_VALUE|TCL_
1880: 4c 49 53 54 5f 45 4c 45 4d 45 4e 54 29 3b 0a 20  LIST_ELEMENT);. 
1890: 20 20 20 20 76 61 72 50 74 72 20 3d 20 54 63 6c      varPtr = Tcl
18a0: 4c 6f 6f 6b 75 70 56 61 72 28 69 6e 74 65 72 70  LookupVar(interp
18b0: 2c 20 70 61 72 74 31 2c 20 70 61 72 74 32 2c 20  , part1, part2, 
18c0: 66 6c 61 67 73 2c 20 22 73 65 74 22 2c 0a 20 09  flags, "set",. .
18d0: 20 20 20 20 2f 2a 63 72 65 61 74 65 50 61 72 74      /*createPart
18e0: 31 2a 2f 20 31 2c 20 2f 2a 63 72 65 61 74 65 50  1*/ 1, /*createP
18f0: 61 72 74 32 2a 2f 20 31 2c 20 26 61 72 72 61 79  art2*/ 1, &array
1900: 50 74 72 29 3b 0a 20 20 20 20 20 69 66 20 28 76  Ptr);.     if (v
1910: 61 72 50 74 72 20 3d 3d 20 4e 55 4c 4c 29 20 7b  arPtr == NULL) {
1920: 0a 40 40 20 2d 31 35 31 32 2c 36 20 2b 31 35 30  .@@ -1512,6 +150
1930: 35 2c 39 20 40 40 0a 20 20 20 20 20 70 61 72 74  5,9 @@.     part
1940: 31 20 3d 20 54 63 6c 47 65 74 53 74 72 69 6e 67  1 = TclGetString
1950: 28 70 61 72 74 31 50 74 72 29 3b 0a 20 20 20 20  (part1Ptr);.    
1960: 20 70 61 72 74 32 20 3d 20 28 28 70 61 72 74 32   part2 = ((part2
1970: 50 74 72 20 3d 3d 20 4e 55 4c 4c 29 20 3f 20 4e  Ptr == NULL) ? N
1980: 55 4c 4c 20 3a 20 54 63 6c 47 65 74 53 74 72 69  ULL : TclGetStri
1990: 6e 67 28 70 61 72 74 32 50 74 72 29 29 3b 0a 20  ng(part2Ptr));. 
19a0: 0a 2b 20 20 20 20 2f 2a 20 46 69 6c 74 65 72 20  .+    /* Filter 
19b0: 74 6f 20 70 61 73 73 20 74 68 72 6f 75 67 68 20  to pass through 
19c0: 6f 6e 6c 79 20 74 68 65 20 66 6c 61 67 73 20 74  only the flags t
19d0: 68 69 73 20 69 6e 74 65 72 66 61 63 65 20 73 75  his interface su
19e0: 70 70 6f 72 74 73 2e 20 2a 2f 0a 2b 20 20 20 20  pports. */.+    
19f0: 66 6c 61 67 73 20 26 3d 20 28 54 43 4c 5f 47 4c  flags &= (TCL_GL
1a00: 4f 42 41 4c 5f 4f 4e 4c 59 7c 54 43 4c 5f 4e 41  OBAL_ONLY|TCL_NA
1a10: 4d 45 53 50 41 43 45 5f 4f 4e 4c 59 7c 54 43 4c  MESPACE_ONLY|TCL
1a20: 5f 4c 45 41 56 45 5f 45 52 52 5f 4d 53 47 0a 2b  _LEAVE_ERR_MSG.+
1a30: 09 20 20 20 20 7c 54 43 4c 5f 41 50 50 45 4e 44  .    |TCL_APPEND
1a40: 5f 56 41 4c 55 45 7c 54 43 4c 5f 4c 49 53 54 5f  _VALUE|TCL_LIST_
1a50: 45 4c 45 4d 45 4e 54 29 3b 0a 20 20 20 20 20 76  ELEMENT);.     v
1a60: 61 72 50 74 72 20 3d 20 54 63 6c 4f 62 6a 4c 6f  arPtr = TclObjLo
1a70: 6f 6b 75 70 56 61 72 28 69 6e 74 65 72 70 2c 20  okupVar(interp, 
1a80: 70 61 72 74 31 50 74 72 2c 20 70 61 72 74 32 2c  part1Ptr, part2,
1a90: 20 66 6c 61 67 73 2c 20 22 73 65 74 22 2c 0a 20   flags, "set",. 
1aa0: 09 20 20 20 20 2f 2a 63 72 65 61 74 65 50 61 72  .    /*createPar
1ab0: 74 31 2a 2f 20 31 2c 20 2f 2a 63 72 65 61 74 65  t1*/ 1, /*create
1ac0: 50 61 72 74 32 2a 2f 20 31 2c 20 26 61 72 72 61  Part2*/ 1, &arra
1ad0: 79 50 74 72 29 3b 0a 20 20 20 20 20 69 66 20 28  yPtr);.     if (
1ae0: 76 61 72 50 74 72 20 3d 3d 20 4e 55 4c 4c 29 20  varPtr == NULL) 
1af0: 7b 0a 40 40 20 2d 31 36 30 33 2c 37 20 2b 31 35  {.@@ -1603,7 +15
1b00: 39 39 2c 38 20 40 40 0a 20 0a 20 20 20 20 20 2f  99,8 @@. .     /
1b10: 2a 0a 20 20 20 20 20 20 2a 20 49 6e 76 6f 6b 65  *.      * Invoke
1b20: 20 61 6e 79 20 72 65 61 64 20 74 72 61 63 65 73   any read traces
1b30: 20 74 68 61 74 20 68 61 76 65 20 62 65 65 6e 20   that have been 
1b40: 73 65 74 20 66 6f 72 20 74 68 65 20 76 61 72 69  set for the vari
1b50: 61 62 6c 65 20 69 66 20 69 74 20 69 73 0a 2d 20  able if it is.- 
1b60: 20 20 20 20 2a 20 72 65 71 75 65 73 74 65 64 3b      * requested;
1b70: 20 74 68 69 73 20 69 73 20 6f 6e 6c 79 20 64 6f   this is only do
1b80: 6e 65 20 69 6e 20 74 68 65 20 63 6f 72 65 20 77  ne in the core w
1b90: 68 65 6e 20 6c 61 70 70 65 6e 64 69 6e 67 2e 0a  hen lappending..
1ba0: 2b 20 20 20 20 20 2a 20 72 65 71 75 65 73 74 65  +     * requeste
1bb0: 64 3b 20 74 68 69 73 20 69 73 20 6f 6e 6c 79 20  d; this is only 
1bc0: 64 6f 6e 65 20 69 6e 20 74 68 65 20 63 6f 72 65  done in the core
1bd0: 20 62 79 20 74 68 65 20 49 4e 53 54 5f 4c 41 50   by the INST_LAP
1be0: 50 45 4e 44 5f 2a 0a 2b 20 20 20 20 20 2a 20 69  PEND_*.+     * i
1bf0: 6e 73 74 72 75 63 74 69 6f 6e 73 2e 0a 20 20 20  nstructions..   
1c00: 20 20 20 2a 2f 0a 20 0a 20 20 20 20 20 69 66 20     */. .     if 
1c10: 28 28 66 6c 61 67 73 20 26 20 54 43 4c 5f 54 52  ((flags & TCL_TR
1c20: 41 43 45 5f 52 45 41 44 53 29 20 26 26 20 28 28  ACE_READS) && ((
1c30: 76 61 72 50 74 72 2d 3e 74 72 61 63 65 50 74 72  varPtr->tracePtr
1c40: 20 21 3d 20 4e 55 4c 4c 29 0a 40 40 20 2d 31 39   != NULL).@@ -19
1c50: 33 36 2c 36 20 2b 31 39 33 33 2c 38 20 40 40 0a  36,6 +1933,8 @@.
1c60: 20 0a 20 20 20 20 20 70 61 72 74 31 50 74 72 20   .     part1Ptr 
1c70: 3d 20 54 63 6c 5f 4e 65 77 53 74 72 69 6e 67 4f  = Tcl_NewStringO
1c80: 62 6a 28 70 61 72 74 31 2c 20 2d 31 29 3b 0a 20  bj(part1, -1);. 
1c90: 20 20 20 20 54 63 6c 5f 49 6e 63 72 52 65 66 43      Tcl_IncrRefC
1ca0: 6f 75 6e 74 28 70 61 72 74 31 50 74 72 29 3b 0a  ount(part1Ptr);.
1cb0: 2b 20 20 20 20 2f 2a 20 46 69 6c 74 65 72 20 74  +    /* Filter t
1cc0: 6f 20 70 61 73 73 20 74 68 72 6f 75 67 68 20 6f  o pass through o
1cd0: 6e 6c 79 20 74 68 65 20 66 6c 61 67 73 20 74 68  nly the flags th
1ce0: 69 73 20 69 6e 74 65 72 66 61 63 65 20 73 75 70  is interface sup
1cf0: 70 6f 72 74 73 2e 20 2a 2f 0a 2b 20 20 20 20 66  ports. */.+    f
1d00: 6c 61 67 73 20 26 3d 20 28 54 43 4c 5f 47 4c 4f  lags &= (TCL_GLO
1d10: 42 41 4c 5f 4f 4e 4c 59 7c 54 43 4c 5f 4e 41 4d  BAL_ONLY|TCL_NAM
1d20: 45 53 50 41 43 45 5f 4f 4e 4c 59 7c 54 43 4c 5f  ESPACE_ONLY|TCL_
1d30: 4c 45 41 56 45 5f 45 52 52 5f 4d 53 47 29 3b 0a  LEAVE_ERR_MSG);.
1d40: 20 20 20 20 20 72 65 73 75 6c 74 20 3d 20 54 63       result = Tc
1d50: 6c 4f 62 6a 55 6e 73 65 74 56 61 72 32 28 69 6e  lObjUnsetVar2(in
1d60: 74 65 72 70 2c 20 70 61 72 74 31 50 74 72 2c 20  terp, part1Ptr, 
1d70: 70 61 72 74 32 2c 20 66 6c 61 67 73 29 3b 0a 20  part2, flags);. 
1d80: 20 20 20 20 54 63 6c 44 65 63 72 52 65 66 43 6f      TclDecrRefCo
1d90: 75 6e 74 28 70 61 72 74 31 50 74 72 29 3b 0a 20  unt(part1Ptr);. 
1da0: 0a 40 40 20 2d 32 31 32 31 2c 38 20 2b 32 31 32  .@@ -2121,8 +212
1db0: 30 2c 38 20 40 40 0a 20 20 20 20 20 69 66 20 28  0,8 @@.     if (
1dc0: 28 64 75 6d 6d 79 56 61 72 2e 74 72 61 63 65 50  (dummyVar.traceP
1dd0: 74 72 20 21 3d 20 4e 55 4c 4c 29 0a 20 09 20 20  tr != NULL). .  
1de0: 20 20 7c 7c 20 28 28 61 72 72 61 79 50 74 72 20    || ((arrayPtr 
1df0: 21 3d 20 4e 55 4c 4c 29 20 26 26 20 28 61 72 72  != NULL) && (arr
1e00: 61 79 50 74 72 2d 3e 74 72 61 63 65 50 74 72 20  ayPtr->tracePtr 
1e10: 21 3d 20 4e 55 4c 4c 29 29 29 20 7b 0a 20 09 64  != NULL))) {. .d
1e20: 75 6d 6d 79 56 61 72 2e 66 6c 61 67 73 20 26 3d  ummyVar.flags &=
1e30: 20 7e 56 41 52 5f 54 52 41 43 45 5f 41 43 54 49   ~VAR_TRACE_ACTI
1e40: 56 45 3b 0a 2d 09 54 63 6c 43 61 6c 6c 56 61 72  VE;.-.TclCallVar
1e50: 54 72 61 63 65 73 28 69 50 74 72 2c 20 61 72 72  Traces(iPtr, arr
1e60: 61 79 50 74 72 2c 20 26 64 75 6d 6d 79 56 61 72  ayPtr, &dummyVar
1e70: 2c 20 70 61 72 74 31 2c 20 70 61 72 74 32 2c 0a  , part1, part2,.
1e80: 2d 09 09 28 66 6c 61 67 73 20 26 20 28 54 43 4c  -..(flags & (TCL
1e90: 5f 47 4c 4f 42 41 4c 5f 4f 4e 4c 59 7c 54 43 4c  _GLOBAL_ONLY|TCL
1ea0: 5f 4e 41 4d 45 53 50 41 43 45 5f 4f 4e 4c 59 7c  _NAMESPACE_ONLY|
1eb0: 54 43 4c 5f 49 4e 54 45 52 50 5f 44 45 53 54 52  TCL_INTERP_DESTR
1ec0: 4f 59 45 44 29 29 0a 2b 09 54 63 6c 43 61 6c 6c  OYED)).+.TclCall
1ed0: 56 61 72 54 72 61 63 65 73 28 69 50 74 72 2c 20  VarTraces(iPtr, 
1ee0: 61 72 72 61 79 50 74 72 2c 20 26 64 75 6d 6d 79  arrayPtr, &dummy
1ef0: 56 61 72 2c 20 70 61 72 74 31 2c 20 70 61 72 74  Var, part1, part
1f00: 32 2c 20 28 66 6c 61 67 73 0a 2b 09 09 26 20 28  2, (flags.+..& (
1f10: 54 43 4c 5f 47 4c 4f 42 41 4c 5f 4f 4e 4c 59 7c  TCL_GLOBAL_ONLY|
1f20: 54 43 4c 5f 4e 41 4d 45 53 50 41 43 45 5f 4f 4e  TCL_NAMESPACE_ON
1f30: 4c 59 29 29 0a 20 09 09 7c 20 54 43 4c 5f 54 52  LY)). ..| TCL_TR
1f40: 41 43 45 5f 55 4e 53 45 54 53 2c 20 2f 2a 20 6c  ACE_UNSETS, /* l
1f50: 65 61 76 65 45 72 72 4d 73 67 20 2a 2f 20 30 29  eaveErrMsg */ 0)
1f60: 3b 0a 20 09 77 68 69 6c 65 20 28 64 75 6d 6d 79  ;. .while (dummy
1f70: 56 61 72 2e 74 72 61 63 65 50 74 72 20 21 3d 20  Var.tracePtr != 
1f80: 4e 55 4c 4c 29 20 7b 0a 20 09 20 20 20 20 56 61  NULL) {. .    Va
1f90: 72 54 72 61 63 65 20 2a 74 72 61 63 65 50 74 72  rTrace *tracePtr
1fa0: 20 3d 20 64 75 6d 6d 79 56 61 72 2e 74 72 61 63   = dummyVar.trac
1fb0: 65 50 74 72 3b 0a 40 40 20 2d 32 31 34 36 2c 32  ePtr;.@@ -2146,2
1fc0: 31 20 2b 32 31 34 35 2c 38 20 40 40 0a 20 0a 20  1 +2145,8 @@. . 
1fd0: 20 20 20 20 64 75 6d 6d 79 56 61 72 50 74 72 20      dummyVarPtr 
1fe0: 3d 20 26 64 75 6d 6d 79 56 61 72 3b 0a 20 20 20  = &dummyVar;.   
1ff0: 20 20 69 66 20 28 54 63 6c 49 73 56 61 72 41 72    if (TclIsVarAr
2000: 72 61 79 28 64 75 6d 6d 79 56 61 72 50 74 72 29  ray(dummyVarPtr)
2010: 20 26 26 20 21 54 63 6c 49 73 56 61 72 55 6e 64   && !TclIsVarUnd
2020: 65 66 69 6e 65 64 28 64 75 6d 6d 79 56 61 72 50  efined(dummyVarP
2030: 74 72 29 29 20 7b 0a 2d 09 2f 2a 0a 2d 09 20 2a  tr)) {.-./*.-. *
2040: 20 44 65 6c 65 74 69 6e 67 20 74 68 65 20 65 6c   Deleting the el
2050: 65 6d 65 6e 74 73 20 6f 66 20 74 68 65 20 61 72  ements of the ar
2060: 72 61 79 20 6d 61 79 20 63 61 75 73 65 20 74 72  ray may cause tr
2070: 61 63 65 73 20 74 6f 20 62 65 20 66 69 72 65 64  aces to be fired
2080: 20 6f 6e 0a 2d 09 20 2a 20 74 68 6f 73 65 20 65   on.-. * those e
2090: 6c 65 6d 65 6e 74 73 2e 20 42 65 66 6f 72 65 20  lements. Before 
20a0: 64 65 6c 65 74 69 6e 67 20 74 68 65 6d 2c 20 62  deleting them, b
20b0: 75 6d 70 20 74 68 65 20 72 65 66 65 72 65 6e 63  ump the referenc
20c0: 65 20 63 6f 75 6e 74 20 6f 66 0a 2d 09 20 2a 20  e count of.-. * 
20d0: 74 68 65 20 61 72 72 61 79 2c 20 73 6f 20 74 68  the array, so th
20e0: 61 74 20 69 66 20 74 68 6f 73 65 20 74 72 61 63  at if those trac
20f0: 65 20 70 72 6f 63 73 20 6d 61 6b 65 20 61 20 67  e procs make a g
2100: 6c 6f 62 61 6c 20 6f 72 20 75 70 76 61 72 20 6c  lobal or upvar l
2110: 69 6e 6b 0a 2d 09 20 2a 20 74 6f 20 74 68 65 20  ink.-. * to the 
2120: 61 72 72 61 79 2c 20 74 68 65 20 61 72 72 61 79  array, the array
2130: 20 69 73 20 6e 6f 74 20 64 65 6c 65 74 65 64 20   is not deleted 
2140: 77 68 65 6e 20 74 68 65 20 63 61 6c 6c 20 73 74  when the call st
2150: 61 63 6b 20 67 65 74 73 0a 2d 09 20 2a 20 70 6f  ack gets.-. * po
2160: 70 70 65 64 20 28 77 65 20 77 69 6c 6c 20 64 65  pped (we will de
2170: 6c 65 74 65 20 74 68 65 20 61 72 72 61 79 20 6f  lete the array o
2180: 75 72 73 65 6c 76 65 73 20 6c 61 74 65 72 20 69  urselves later i
2190: 6e 20 74 68 69 73 20 66 75 6e 63 74 69 6f 6e 29  n this function)
21a0: 2e 0a 2d 09 20 2a 0a 2d 09 20 2a 20 42 75 6d 70  ..-. *.-. * Bump
21b0: 69 6e 67 20 74 68 65 20 63 6f 75 6e 74 20 63 61  ing the count ca
21c0: 6e 20 6c 65 61 64 20 74 6f 20 74 68 65 20 6f 64  n lead to the od
21d0: 64 20 73 69 74 75 61 74 69 6f 6e 20 74 68 61 74  d situation that
21e0: 20 65 6c 65 6d 65 6e 74 73 20 6f 66 0a 2d 09 20   elements of.-. 
21f0: 2a 20 74 68 65 20 61 72 72 61 79 20 61 72 65 20  * the array are 
2200: 62 65 69 6e 67 20 64 65 6c 65 74 65 64 20 77 68  being deleted wh
2210: 65 6e 20 74 68 65 20 61 72 72 61 79 20 73 74 69  en the array sti
2220: 6c 6c 20 65 78 69 73 74 73 2c 20 62 75 74 20 73  ll exists, but s
2230: 69 6e 63 65 0a 2d 09 20 2a 20 74 68 65 20 61 72  ince.-. * the ar
2240: 72 61 79 20 69 73 20 61 62 6f 75 74 20 74 6f 20  ray is about to 
2250: 62 65 20 72 65 6d 6f 76 65 64 20 61 6e 79 77 61  be removed anywa
2260: 79 2c 20 74 68 61 74 20 73 68 6f 75 6c 64 6e 27  y, that shouldn'
2270: 74 20 72 65 61 6c 6c 79 0a 2d 09 20 2a 20 6d 61  t really.-. * ma
2280: 74 74 65 72 2e 0a 2d 09 20 2a 2f 0a 2d 0a 2d 09  tter..-. */.-.-.
2290: 44 65 6c 65 74 65 41 72 72 61 79 28 69 50 74 72  DeleteArray(iPtr
22a0: 2c 20 70 61 72 74 31 2c 20 64 75 6d 6d 79 56 61  , part1, dummyVa
22b0: 72 50 74 72 2c 0a 2d 09 09 28 66 6c 61 67 73 20  rPtr,.-..(flags 
22c0: 26 20 28 54 43 4c 5f 47 4c 4f 42 41 4c 5f 4f 4e  & (TCL_GLOBAL_ON
22d0: 4c 59 7c 54 43 4c 5f 4e 41 4d 45 53 50 41 43 45  LY|TCL_NAMESPACE
22e0: 5f 4f 4e 4c 59 29 29 0a 2b 09 44 65 6c 65 74 65  _ONLY)).+.Delete
22f0: 41 72 72 61 79 28 69 50 74 72 2c 20 70 61 72 74  Array(iPtr, part
2300: 31 2c 20 64 75 6d 6d 79 56 61 72 50 74 72 2c 20  1, dummyVarPtr, 
2310: 28 66 6c 61 67 73 20 0a 2b 09 09 26 20 28 54 43  (flags .+..& (TC
2320: 4c 5f 47 4c 4f 42 41 4c 5f 4f 4e 4c 59 7c 54 43  L_GLOBAL_ONLY|TC
2330: 4c 5f 4e 41 4d 45 53 50 41 43 45 5f 4f 4e 4c 59  L_NAMESPACE_ONLY
2340: 29 29 0a 20 09 09 7c 20 54 43 4c 5f 54 52 41 43  )). ..| TCL_TRAC
2350: 45 5f 55 4e 53 45 54 53 29 3b 0a 20 0a 20 09 2f  E_UNSETS);. . ./
2360: 2a 0a 40 40 20 2d 32 33 39 30 2c 31 30 20 2b 32  *.@@ -2390,10 +2
2370: 33 37 36 2c 37 20 40 40 0a 20 09 63 72 65 61 74  376,7 @@. .creat
2380: 65 64 4e 65 77 4f 62 6a 20 3d 20 30 3b 0a 20 0a  edNewObj = 0;. .
2390: 20 09 2f 2a 0a 2d 09 20 2a 20 55 73 65 20 74 68   ./*.-. * Use th
23a0: 65 20 54 43 4c 5f 54 52 41 43 45 5f 52 45 41 44  e TCL_TRACE_READ
23b0: 53 20 66 6c 61 67 20 74 6f 20 65 6e 73 75 72 65  S flag to ensure
23c0: 20 74 68 61 74 20 69 66 20 77 65 20 68 61 76 65   that if we have
23d0: 20 61 6e 20 61 72 72 61 79 0a 2d 09 20 2a 20 77   an array.-. * w
23e0: 69 74 68 20 6e 6f 20 65 6c 65 6d 65 6e 74 73 20  ith no elements 
23f0: 73 65 74 20 79 65 74 2c 20 62 75 74 20 77 69 74  set yet, but wit
2400: 68 20 61 20 72 65 61 64 20 74 72 61 63 65 20 6f  h a read trace o
2410: 6e 20 69 74 2c 20 77 65 20 77 69 6c 6c 0a 2d 09  n it, we will.-.
2420: 20 2a 20 63 72 65 61 74 65 20 74 68 65 20 76 61   * create the va
2430: 72 69 61 62 6c 65 20 61 6e 64 20 67 65 74 20 72  riable and get r
2440: 65 61 64 20 74 72 61 63 65 73 20 74 72 69 67 67  ead traces trigg
2450: 65 72 65 64 2e 20 4e 6f 74 65 20 74 68 61 74 20  ered. Note that 
2460: 79 6f 75 0a 2d 09 20 2a 20 68 61 76 65 20 74 6f  you.-. * have to
2470: 20 70 72 6f 74 65 63 74 20 74 68 65 20 76 61 72   protect the var
2480: 69 61 62 6c 65 20 70 6f 69 6e 74 65 72 73 20 61  iable pointers a
2490: 72 6f 75 6e 64 20 74 68 65 20 54 63 6c 50 74 72  round the TclPtr
24a0: 47 65 74 56 61 72 20 63 61 6c 6c 0a 2b 09 20 2a  GetVar call.+. *
24b0: 20 50 72 6f 74 65 63 74 20 74 68 65 20 76 61 72   Protect the var
24c0: 69 61 62 6c 65 20 70 6f 69 6e 74 65 72 73 20 61  iable pointers a
24d0: 72 6f 75 6e 64 20 74 68 65 20 54 63 6c 50 74 72  round the TclPtr
24e0: 47 65 74 56 61 72 20 63 61 6c 6c 0a 20 09 20 2a  GetVar call. . *
24f0: 20 74 6f 20 69 6e 73 75 72 65 20 74 68 61 74 20   to insure that 
2500: 74 68 65 79 20 72 65 6d 61 69 6e 20 76 61 6c 69  they remain vali
2510: 64 20 65 76 65 6e 20 69 66 20 74 68 65 20 76 61  d even if the va
2520: 72 69 61 62 6c 65 20 77 61 73 20 75 6e 64 65 66  riable was undef
2530: 69 6e 65 64 0a 20 09 20 2a 20 61 6e 64 20 75 6e  ined. . * and un
2540: 75 73 65 64 2e 0a 20 09 20 2a 2f 0a 40 40 20 2d  used.. . */.@@ -
2550: 32 34 30 39 2c 37 20 2b 32 33 39 32 2c 37 20 40  2409,7 +2392,7 @
2560: 40 0a 20 09 7d 0a 20 09 70 61 72 74 31 20 3d 20  @. .}. .part1 = 
2570: 54 63 6c 47 65 74 53 74 72 69 6e 67 28 6f 62 6a  TclGetString(obj
2580: 76 5b 31 5d 29 3b 0a 20 09 76 61 72 56 61 6c 75  v[1]);. .varValu
2590: 65 50 74 72 20 3d 20 54 63 6c 50 74 72 47 65 74  ePtr = TclPtrGet
25a0: 56 61 72 28 69 6e 74 65 72 70 2c 20 76 61 72 50  Var(interp, varP
25b0: 74 72 2c 20 61 72 72 61 79 50 74 72 2c 20 70 61  tr, arrayPtr, pa
25c0: 72 74 31 2c 20 4e 55 4c 4c 2c 0a 2d 09 09 28 54  rt1, NULL,.-..(T
25d0: 43 4c 5f 54 52 41 43 45 5f 52 45 41 44 53 20 7c  CL_TRACE_READS |
25e0: 20 54 43 4c 5f 4c 45 41 56 45 5f 45 52 52 5f 4d   TCL_LEAVE_ERR_M
25f0: 53 47 29 29 3b 0a 2b 09 09 54 43 4c 5f 4c 45 41  SG));.+..TCL_LEA
2600: 56 45 5f 45 52 52 5f 4d 53 47 29 3b 0a 20 09 76  VE_ERR_MSG);. .v
2610: 61 72 50 74 72 2d 3e 72 65 66 43 6f 75 6e 74 2d  arPtr->refCount-
2620: 2d 3b 0a 20 09 69 66 20 28 61 72 72 61 79 50 74  -;. .if (arrayPt
2630: 72 20 21 3d 20 4e 55 4c 4c 29 20 7b 0a 20 09 20  r != NULL) {. . 
2640: 20 20 20 61 72 72 61 79 50 74 72 2d 3e 72 65 66     arrayPtr->ref
2650: 43 6f 75 6e 74 2d 2d 3b 0a 40 40 20 2d 34 30 37  Count--;.@@ -407
2660: 38 2c 39 20 2b 34 30 36 31 2c 36 20 40 40 0a 20  8,9 +4061,6 @@. 
2670: 20 20 20 20 7d 20 65 6c 73 65 20 69 66 20 28 6e      } else if (n
2680: 73 50 74 72 20 3d 3d 20 28 4e 61 6d 65 73 70 61  sPtr == (Namespa
2690: 63 65 20 2a 29 20 54 63 6c 5f 47 65 74 43 75 72  ce *) Tcl_GetCur
26a0: 72 65 6e 74 4e 61 6d 65 73 70 61 63 65 28 69 6e  rentNamespace(in
26b0: 74 65 72 70 29 29 20 7b 0a 20 09 66 6c 61 67 73  terp)) {. .flags
26c0: 20 3d 20 54 43 4c 5f 4e 41 4d 45 53 50 41 43 45   = TCL_NAMESPACE
26d0: 5f 4f 4e 4c 59 3b 0a 20 20 20 20 20 7d 0a 2d 20  _ONLY;.     }.- 
26e0: 20 20 20 69 66 20 28 54 63 6c 5f 49 6e 74 65 72     if (Tcl_Inter
26f0: 70 44 65 6c 65 74 65 64 28 69 6e 74 65 72 70 29  pDeleted(interp)
2700: 29 20 7b 0a 2d 09 66 6c 61 67 73 20 7c 3d 20 54  ) {.-.flags |= T
2710: 43 4c 5f 49 4e 54 45 52 50 5f 44 45 53 54 52 4f  CL_INTERP_DESTRO
2720: 59 45 44 3b 0a 2d 20 20 20 20 7d 0a 20 0a 20 20  YED;.-    }. .  
2730: 20 20 20 66 6f 72 20 28 68 50 74 72 20 3d 20 54     for (hPtr = T
2740: 63 6c 5f 46 69 72 73 74 48 61 73 68 45 6e 74 72  cl_FirstHashEntr
2750: 79 28 74 61 62 6c 65 50 74 72 2c 20 26 73 65 61  y(tablePtr, &sea
2760: 72 63 68 29 3b 20 20 68 50 74 72 20 21 3d 20 4e  rch);  hPtr != N
2770: 55 4c 4c 3b 0a 20 09 20 68 50 74 72 20 3d 20 54  ULL;. . hPtr = T
2780: 63 6c 5f 46 69 72 73 74 48 61 73 68 45 6e 74 72  cl_FirstHashEntr
2790: 79 28 74 61 62 6c 65 50 74 72 2c 20 26 73 65 61  y(tablePtr, &sea
27a0: 72 63 68 29 29 20 7b 0a 40 40 20 2d 34 31 35 38  rch)) {.@@ -4158
27b0: 2c 39 20 2b 34 31 33 38 2c 36 20 40 40 0a 20 20  ,9 +4138,6 @@.  
27c0: 20 20 20 7d 20 65 6c 73 65 20 69 66 20 28 74 61     } else if (ta
27d0: 62 6c 65 50 74 72 20 3d 3d 20 26 63 75 72 72 4e  blePtr == &currN
27e0: 73 50 74 72 2d 3e 76 61 72 54 61 62 6c 65 29 20  sPtr->varTable) 
27f0: 7b 0a 20 09 66 6c 61 67 73 20 7c 3d 20 54 43 4c  {. .flags |= TCL
2800: 5f 4e 41 4d 45 53 50 41 43 45 5f 4f 4e 4c 59 3b  _NAMESPACE_ONLY;
2810: 0a 20 20 20 20 20 7d 0a 2d 20 20 20 20 69 66 20  .     }.-    if 
2820: 28 54 63 6c 5f 49 6e 74 65 72 70 44 65 6c 65 74  (Tcl_InterpDelet
2830: 65 64 28 69 6e 74 65 72 70 29 29 20 7b 0a 2d 09  ed(interp)) {.-.
2840: 66 6c 61 67 73 20 7c 3d 20 54 43 4c 5f 49 4e 54  flags |= TCL_INT
2850: 45 52 50 5f 44 45 53 54 52 4f 59 45 44 3b 0a 2d  ERP_DESTROYED;.-
2860: 20 20 20 20 7d 0a 20 0a 20 20 20 20 20 66 6f 72      }. .     for
2870: 20 28 68 50 74 72 20 3d 20 54 63 6c 5f 46 69 72   (hPtr = Tcl_Fir
2880: 73 74 48 61 73 68 45 6e 74 72 79 28 74 61 62 6c  stHashEntry(tabl
2890: 65 50 74 72 2c 20 26 73 65 61 72 63 68 29 3b 20  ePtr, &search); 
28a0: 68 50 74 72 20 21 3d 20 4e 55 4c 4c 3b 0a 20 09  hPtr != NULL;. .
28b0: 20 20 20 20 68 50 74 72 20 3d 20 54 63 6c 5f 4e      hPtr = Tcl_N
28c0: 65 78 74 48 61 73 68 45 6e 74 72 79 28 26 73 65  extHashEntry(&se
28d0: 61 72 63 68 29 29 20 7b 0a 40 40 20 2d 34 33 38  arch)) {.@@ -438
28e0: 39 2c 38 20 2b 34 33 36 36 2c 37 20 40 40 0a 20  9,8 +4366,7 @@. 
28f0: 20 20 20 20 56 61 72 20 2a 76 61 72 50 74 72 2c      Var *varPtr,
2900: 09 09 2f 2a 20 50 6f 69 6e 74 65 72 20 74 6f 20  ../* Pointer to 
2910: 76 61 72 69 61 62 6c 65 20 73 74 72 75 63 74 75  variable structu
2920: 72 65 2e 20 2a 2f 0a 20 20 20 20 20 69 6e 74 20  re. */.     int 
2930: 66 6c 61 67 73 29 09 09 09 2f 2a 20 46 6c 61 67  flags).../* Flag
2940: 73 20 74 6f 20 70 61 73 73 20 74 6f 20 54 63 6c  s to pass to Tcl
2950: 43 61 6c 6c 56 61 72 54 72 61 63 65 73 3a 0a 20  CallVarTraces:. 
2960: 09 09 09 09 20 2a 20 54 43 4c 5f 54 52 41 43 45  .... * TCL_TRACE
2970: 5f 55 4e 53 45 54 53 20 61 6e 64 20 73 6f 6d 65  _UNSETS and some
2980: 74 69 6d 65 73 0a 2d 09 09 09 09 20 2a 20 54 43  times.-.... * TC
2990: 4c 5f 49 4e 54 45 52 50 5f 44 45 53 54 52 4f 59  L_INTERP_DESTROY
29a0: 45 44 2c 20 54 43 4c 5f 4e 41 4d 45 53 50 41 43  ED, TCL_NAMESPAC
29b0: 45 5f 4f 4e 4c 59 2c 0a 2d 09 09 09 09 20 2a 20  E_ONLY,.-.... * 
29c0: 6f 72 20 54 43 4c 5f 47 4c 4f 42 41 4c 5f 4f 4e  or TCL_GLOBAL_ON
29d0: 4c 59 2e 20 2a 2f 0a 2b 09 09 09 09 20 2a 20 54  LY. */.+.... * T
29e0: 43 4c 5f 4e 41 4d 45 53 50 41 43 45 5f 4f 4e 4c  CL_NAMESPACE_ONL
29f0: 59 20 6f 72 20 54 43 4c 5f 47 4c 4f 42 41 4c 5f  Y or TCL_GLOBAL_
2a00: 4f 4e 4c 59 2e 20 2a 2f 0a 20 7b 0a 20 20 20 20  ONLY. */. {.    
2a10: 20 54 63 6c 5f 48 61 73 68 53 65 61 72 63 68 20   Tcl_HashSearch 
2a20: 73 65 61 72 63 68 3b 0a 20 20 20 20 20 72 65 67  search;.     reg
2a30: 69 73 74 65 72 20 54 63 6c 5f 48 61 73 68 45 6e  ister Tcl_HashEn
2a40: 74 72 79 20 2a 68 50 74 72 3b 0a                 try *hPtr;.