Attachment "8ab8a138c915.diff" to
ticket [8ab8a138c9]
added by
chrstphrchvz
2023-10-07 12:33:36.
0000: 64 69 66 66 20 2d 2d 67 69 74 20 67 65 6e 65 72 diff --git gener
0010: 69 63 2f 74 63 6c 42 61 73 69 63 2e 63 20 67 65 ic/tclBasic.c ge
0020: 6e 65 72 69 63 2f 74 63 6c 42 61 73 69 63 2e 63 neric/tclBasic.c
0030: 0a 69 6e 64 65 78 20 39 64 38 34 64 65 32 38 32 .index 9d84de282
0040: 66 2e 2e 34 38 32 31 64 35 32 37 38 35 20 31 30 f..4821d52785 10
0050: 30 36 34 34 0a 2d 2d 2d 20 67 65 6e 65 72 69 63 0644.--- generic
0060: 2f 74 63 6c 42 61 73 69 63 2e 63 0a 2b 2b 2b 20 /tclBasic.c.+++
0070: 67 65 6e 65 72 69 63 2f 74 63 6c 42 61 73 69 63 generic/tclBasic
0080: 2e 63 0a 40 40 20 2d 31 33 36 2c 37 20 2b 31 33 .c.@@ -136,7 +13
0090: 36 2c 37 20 40 40 20 73 74 61 74 69 63 20 69 6e 6,7 @@ static in
00a0: 74 09 09 43 61 6e 63 65 6c 45 76 61 6c 50 72 6f t..CancelEvalPro
00b0: 63 28 43 6c 69 65 6e 74 44 61 74 61 20 63 6c 69 c(ClientData cli
00c0: 65 6e 74 44 61 74 61 2c 0a 20 09 09 09 20 20 20 entData,. ...
00d0: 20 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74 Tcl_Interp *int
00e0: 65 72 70 2c 20 69 6e 74 20 63 6f 64 65 29 3b 0a erp, int code);.
00f0: 20 73 74 61 74 69 63 20 69 6e 74 09 09 43 68 65 static int..Che
0100: 63 6b 44 6f 75 62 6c 65 52 65 73 75 6c 74 28 54 ckDoubleResult(T
0110: 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e 74 65 72 cl_Interp *inter
0120: 70 2c 20 64 6f 75 62 6c 65 20 64 52 65 73 75 6c p, double dResul
0130: 74 29 3b 0a 20 73 74 61 74 69 63 20 76 6f 69 64 t);. static void
0140: 09 09 44 65 6c 65 74 65 43 6f 72 6f 75 74 69 6e ..DeleteCoroutin
0150: 65 28 43 6c 69 65 6e 74 44 61 74 61 20 63 6c 69 e(ClientData cli
0160: 65 6e 74 44 61 74 61 29 3b 0a 2d 73 74 61 74 69 entData);.-stati
0170: 63 20 76 6f 69 64 09 09 44 65 6c 65 74 65 49 6e c void..DeleteIn
0180: 74 65 72 70 50 72 6f 63 28 54 63 6c 5f 49 6e 74 terpProc(Tcl_Int
0190: 65 72 70 20 2a 69 6e 74 65 72 70 29 3b 0a 2b 73 erp *interp);.+s
01a0: 74 61 74 69 63 20 54 63 6c 5f 46 72 65 65 50 72 tatic Tcl_FreePr
01b0: 6f 63 09 44 65 6c 65 74 65 49 6e 74 65 72 70 50 oc.DeleteInterpP
01c0: 72 6f 63 3b 0a 20 73 74 61 74 69 63 20 76 6f 69 roc;. static voi
01d0: 64 09 09 44 65 6c 65 74 65 4f 70 43 6d 64 43 6c d..DeleteOpCmdCl
01e0: 69 65 6e 74 44 61 74 61 28 43 6c 69 65 6e 74 44 ientData(ClientD
01f0: 61 74 61 20 63 6c 69 65 6e 74 44 61 74 61 29 3b ata clientData);
0200: 0a 20 23 69 66 64 65 66 20 55 53 45 5f 44 54 52 . #ifdef USE_DTR
0210: 41 43 45 0a 20 73 74 61 74 69 63 20 54 63 6c 5f ACE. static Tcl_
0220: 4f 62 6a 43 6d 64 50 72 6f 63 09 44 54 72 61 63 ObjCmdProc.DTrac
0230: 65 4f 62 6a 43 6d 64 3b 0a 40 40 20 2d 31 33 39 eObjCmd;.@@ -139
0240: 32 2c 37 20 2b 31 33 39 32 2c 37 20 40 40 20 54 2,7 +1392,7 @@ T
0250: 63 6c 5f 44 65 6c 65 74 65 49 6e 74 65 72 70 28 cl_DeleteInterp(
0260: 0a 20 20 20 20 20 20 2a 20 45 6e 73 75 72 65 20 . * Ensure
0270: 74 68 61 74 20 74 68 65 20 69 6e 74 65 72 70 72 that the interpr
0280: 65 74 65 72 20 69 73 20 65 76 65 6e 74 75 61 6c eter is eventual
0290: 6c 79 20 64 65 6c 65 74 65 64 2e 0a 20 20 20 20 ly deleted..
02a0: 20 20 2a 2f 0a 20 0a 2d 20 20 20 20 54 63 6c 5f */. .- Tcl_
02b0: 45 76 65 6e 74 75 61 6c 6c 79 46 72 65 65 28 69 EventuallyFree(i
02c0: 6e 74 65 72 70 2c 20 28 54 63 6c 5f 46 72 65 65 nterp, (Tcl_Free
02d0: 50 72 6f 63 20 2a 29 20 44 65 6c 65 74 65 49 6e Proc *) DeleteIn
02e0: 74 65 72 70 50 72 6f 63 29 3b 0a 2b 20 20 20 20 terpProc);.+
02f0: 54 63 6c 5f 45 76 65 6e 74 75 61 6c 6c 79 46 72 Tcl_EventuallyFr
0300: 65 65 28 69 6e 74 65 72 70 2c 20 44 65 6c 65 74 ee(interp, Delet
0310: 65 49 6e 74 65 72 70 50 72 6f 63 29 3b 0a 20 7d eInterpProc);. }
0320: 0a 20 0c 0a 20 2f 2a 0a 40 40 20 2d 31 34 31 38 . .. /*.@@ -1418
0330: 2c 38 20 2b 31 34 31 38 2c 39 20 40 40 20 54 63 ,8 +1418,9 @@ Tc
0340: 6c 5f 44 65 6c 65 74 65 49 6e 74 65 72 70 28 0a l_DeleteInterp(.
0350: 20 0a 20 73 74 61 74 69 63 20 76 6f 69 64 0a 20 . static void.
0360: 44 65 6c 65 74 65 49 6e 74 65 72 70 50 72 6f 63 DeleteInterpProc
0370: 28 0a 2d 20 20 20 20 54 63 6c 5f 49 6e 74 65 72 (.- Tcl_Inter
0380: 70 20 2a 69 6e 74 65 72 70 29 09 09 2f 2a 20 49 p *interp)../* I
0390: 6e 74 65 72 70 72 65 74 65 72 20 74 6f 20 64 65 nterpreter to de
03a0: 6c 65 74 65 2e 20 2a 2f 0a 2b 20 20 20 20 63 68 lete. */.+ ch
03b0: 61 72 20 2a 62 6c 6f 63 6b 50 74 72 29 09 09 2f ar *blockPtr)../
03c0: 2a 20 49 6e 74 65 72 70 72 65 74 65 72 20 74 6f * Interpreter to
03d0: 20 64 65 6c 65 74 65 2e 20 2a 2f 0a 20 7b 0a 2b delete. */. {.+
03e0: 20 20 20 20 54 63 6c 5f 49 6e 74 65 72 70 20 2a Tcl_Interp *
03f0: 69 6e 74 65 72 70 20 3d 20 28 54 63 6c 5f 49 6e interp = (Tcl_In
0400: 74 65 72 70 20 2a 29 20 62 6c 6f 63 6b 50 74 72 terp *) blockPtr
0410: 3b 0a 20 20 20 20 20 49 6e 74 65 72 70 20 2a 69 ;. Interp *i
0420: 50 74 72 20 3d 20 28 49 6e 74 65 72 70 20 2a 29 Ptr = (Interp *)
0430: 20 69 6e 74 65 72 70 3b 0a 20 20 20 20 20 54 63 interp;. Tc
0440: 6c 5f 48 61 73 68 45 6e 74 72 79 20 2a 68 50 74 l_HashEntry *hPt
0450: 72 3b 0a 20 20 20 20 20 54 63 6c 5f 48 61 73 68 r;. Tcl_Hash
0460: 53 65 61 72 63 68 20 73 65 61 72 63 68 3b 0a 64 Search search;.d
0470: 69 66 66 20 2d 2d 67 69 74 20 67 65 6e 65 72 69 iff --git generi
0480: 63 2f 74 63 6c 49 4f 52 43 68 61 6e 2e 63 20 67 c/tclIORChan.c g
0490: 65 6e 65 72 69 63 2f 74 63 6c 49 4f 52 43 68 61 eneric/tclIORCha
04a0: 6e 2e 63 0a 69 6e 64 65 78 20 33 65 63 61 33 66 n.c.index 3eca3f
04b0: 38 64 66 34 2e 2e 36 39 61 38 65 31 31 30 32 64 8df4..69a8e1102d
04c0: 20 31 30 30 36 34 34 0a 2d 2d 2d 20 67 65 6e 65 100644.--- gene
04d0: 72 69 63 2f 74 63 6c 49 4f 52 43 68 61 6e 2e 63 ric/tclIORChan.c
04e0: 0a 2b 2b 2b 20 67 65 6e 65 72 69 63 2f 74 63 6c .+++ generic/tcl
04f0: 49 4f 52 43 68 61 6e 2e 63 0a 40 40 20 2d 34 33 IORChan.c.@@ -43
0500: 30 2c 37 20 2b 34 33 30 2c 37 20 40 40 20 73 74 0,7 +430,7 @@ st
0510: 61 74 69 63 20 54 63 6c 5f 4f 62 6a 20 2a 09 44 atic Tcl_Obj *.D
0520: 65 63 6f 64 65 45 76 65 6e 74 4d 61 73 6b 28 69 ecodeEventMask(i
0530: 6e 74 20 6d 61 73 6b 29 3b 0a 20 73 74 61 74 69 nt mask);. stati
0540: 63 20 52 65 66 6c 65 63 74 65 64 43 68 61 6e 6e c ReflectedChann
0550: 65 6c 20 2a 20 4e 65 77 52 65 66 6c 65 63 74 65 el * NewReflecte
0560: 64 43 68 61 6e 6e 65 6c 28 54 63 6c 5f 49 6e 74 dChannel(Tcl_Int
0570: 65 72 70 20 2a 69 6e 74 65 72 70 2c 0a 20 09 09 erp *interp,. ..
0580: 09 20 20 20 20 54 63 6c 5f 4f 62 6a 20 2a 63 6d . Tcl_Obj *cm
0590: 64 70 66 78 4f 62 6a 2c 20 69 6e 74 20 6d 6f 64 dpfxObj, int mod
05a0: 65 2c 20 54 63 6c 5f 4f 62 6a 20 2a 68 61 6e 64 e, Tcl_Obj *hand
05b0: 6c 65 4f 62 6a 29 3b 0a 20 73 74 61 74 69 63 20 leObj);. static
05c0: 54 63 6c 5f 4f 62 6a 20 2a 09 4e 65 78 74 48 61 Tcl_Obj *.NextHa
05d0: 6e 64 6c 65 28 76 6f 69 64 29 3b 0a 2d 73 74 61 ndle(void);.-sta
05e0: 74 69 63 20 76 6f 69 64 09 09 46 72 65 65 52 65 tic void..FreeRe
05f0: 66 6c 65 63 74 65 64 43 68 61 6e 6e 65 6c 28 52 flectedChannel(R
0600: 65 66 6c 65 63 74 65 64 43 68 61 6e 6e 65 6c 20 eflectedChannel
0610: 2a 72 63 50 74 72 29 3b 0a 2b 73 74 61 74 69 63 *rcPtr);.+static
0620: 20 54 63 6c 5f 46 72 65 65 50 72 6f 63 09 46 72 Tcl_FreeProc.Fr
0630: 65 65 52 65 66 6c 65 63 74 65 64 43 68 61 6e 6e eeReflectedChann
0640: 65 6c 3b 0a 20 73 74 61 74 69 63 20 69 6e 74 09 el;. static int.
0650: 09 49 6e 76 6f 6b 65 54 63 6c 4d 65 74 68 6f 64 .InvokeTclMethod
0660: 28 52 65 66 6c 65 63 74 65 64 43 68 61 6e 6e 65 (ReflectedChanne
0670: 6c 20 2a 72 63 50 74 72 2c 0a 20 09 09 09 20 20 l *rcPtr,. ...
0680: 20 20 4d 65 74 68 6f 64 4e 61 6d 65 20 6d 65 74 MethodName met
0690: 68 6f 64 2c 20 54 63 6c 5f 4f 62 6a 20 2a 61 72 hod, Tcl_Obj *ar
06a0: 67 4f 6e 65 4f 62 6a 2c 0a 20 09 09 09 20 20 20 gOneObj,. ...
06b0: 20 54 63 6c 5f 4f 62 6a 20 2a 61 72 67 54 77 6f Tcl_Obj *argTwo
06c0: 4f 62 6a 2c 20 54 63 6c 5f 4f 62 6a 20 2a 2a 72 Obj, Tcl_Obj **r
06d0: 65 73 75 6c 74 4f 62 6a 50 74 72 29 3b 0a 40 40 esultObjPtr);.@@
06e0: 20 2d 31 31 37 30 2c 37 20 2b 31 31 37 30 2c 37 -1170,7 +1170,7
06f0: 20 40 40 20 52 65 66 6c 65 63 74 43 6c 6f 73 65 @@ ReflectClose
0700: 28 0a 20 09 20 20 20 20 63 6b 66 72 65 65 28 28 (. . ckfree((
0710: 63 68 61 72 20 2a 29 74 63 74 50 74 72 29 3b 0a char *)tctPtr);.
0720: 20 09 20 20 20 20 28 28 43 68 61 6e 6e 65 6c 20 . ((Channel
0730: 2a 29 72 63 50 74 72 2d 3e 63 68 61 6e 29 2d 3e *)rcPtr->chan)->
0740: 74 79 70 65 50 74 72 20 3d 20 4e 55 4c 4c 3b 0a typePtr = NULL;.
0750: 20 09 7d 0a 2d 20 20 20 20 20 20 20 20 54 63 6c .}.- Tcl
0760: 5f 45 76 65 6e 74 75 61 6c 6c 79 46 72 65 65 28 _EventuallyFree(
0770: 72 63 50 74 72 2c 20 28 54 63 6c 5f 46 72 65 65 rcPtr, (Tcl_Free
0780: 50 72 6f 63 20 2a 29 20 46 72 65 65 52 65 66 6c Proc *) FreeRefl
0790: 65 63 74 65 64 43 68 61 6e 6e 65 6c 29 3b 0a 2b ectedChannel);.+
07a0: 20 20 20 20 20 20 20 20 54 63 6c 5f 45 76 65 6e Tcl_Even
07b0: 74 75 61 6c 6c 79 46 72 65 65 28 72 63 50 74 72 tuallyFree(rcPtr
07c0: 2c 20 46 72 65 65 52 65 66 6c 65 63 74 65 64 43 , FreeReflectedC
07d0: 68 61 6e 6e 65 6c 29 3b 0a 20 09 72 65 74 75 72 hannel);. .retur
07e0: 6e 20 45 4f 4b 3b 0a 20 20 20 20 20 7d 0a 20 0a n EOK;. }. .
07f0: 40 40 20 2d 31 32 33 39 2c 37 20 2b 31 32 33 39 @@ -1239,7 +1239
0800: 2c 37 20 40 40 20 52 65 66 6c 65 63 74 43 6c 6f ,7 @@ ReflectClo
0810: 73 65 28 0a 20 09 20 20 20 20 63 6b 66 72 65 65 se(. . ckfree
0820: 28 28 63 68 61 72 20 2a 29 74 63 74 50 74 72 29 ((char *)tctPtr)
0830: 3b 0a 20 09 20 20 20 20 28 28 43 68 61 6e 6e 65 ;. . ((Channe
0840: 6c 20 2a 29 72 63 50 74 72 2d 3e 63 68 61 6e 29 l *)rcPtr->chan)
0850: 2d 3e 74 79 70 65 50 74 72 20 3d 20 4e 55 4c 4c ->typePtr = NULL
0860: 3b 0a 20 20 20 20 20 7d 0a 2d 20 20 20 20 54 63 ;. }.- Tc
0870: 6c 5f 45 76 65 6e 74 75 61 6c 6c 79 46 72 65 65 l_EventuallyFree
0880: 28 72 63 50 74 72 2c 20 28 54 63 6c 5f 46 72 65 (rcPtr, (Tcl_Fre
0890: 65 50 72 6f 63 20 2a 29 20 46 72 65 65 52 65 66 eProc *) FreeRef
08a0: 6c 65 63 74 65 64 43 68 61 6e 6e 65 6c 29 3b 0a lectedChannel);.
08b0: 2b 20 20 20 20 54 63 6c 5f 45 76 65 6e 74 75 61 + Tcl_Eventua
08c0: 6c 6c 79 46 72 65 65 28 72 63 50 74 72 2c 20 46 llyFree(rcPtr, F
08d0: 72 65 65 52 65 66 6c 65 63 74 65 64 43 68 61 6e reeReflectedChan
08e0: 6e 65 6c 29 3b 0a 20 20 20 20 20 72 65 74 75 72 nel);. retur
08f0: 6e 20 28 72 65 73 75 6c 74 20 3d 3d 20 54 43 4c n (result == TCL
0900: 5f 4f 4b 29 20 3f 20 45 4f 4b 20 3a 20 45 49 4e _OK) ? EOK : EIN
0910: 56 41 4c 3b 0a 20 7d 0a 20 0a 40 40 20 2d 32 32 VAL;. }. .@@ -22
0920: 31 30 2c 38 20 2b 32 32 31 30 2c 39 20 40 40 20 10,8 +2210,9 @@
0930: 4e 65 78 74 48 61 6e 64 6c 65 28 76 6f 69 64 29 NextHandle(void)
0940: 0a 20 0c 0a 20 73 74 61 74 69 63 20 76 6f 69 64 . .. static void
0950: 0a 20 46 72 65 65 52 65 66 6c 65 63 74 65 64 43 . FreeReflectedC
0960: 68 61 6e 6e 65 6c 28 0a 2d 20 20 20 20 52 65 66 hannel(.- Ref
0970: 6c 65 63 74 65 64 43 68 61 6e 6e 65 6c 20 2a 72 lectedChannel *r
0980: 63 50 74 72 29 0a 2b 20 20 20 20 63 68 61 72 20 cPtr).+ char
0990: 2a 62 6c 6f 63 6b 50 74 72 29 0a 20 7b 0a 2b 20 *blockPtr). {.+
09a0: 20 20 20 52 65 66 6c 65 63 74 65 64 43 68 61 6e ReflectedChan
09b0: 6e 65 6c 20 2a 72 63 50 74 72 20 3d 20 28 52 65 nel *rcPtr = (Re
09c0: 66 6c 65 63 74 65 64 43 68 61 6e 6e 65 6c 20 2a flectedChannel *
09d0: 29 20 62 6c 6f 63 6b 50 74 72 3b 0a 20 20 20 20 ) blockPtr;.
09e0: 20 43 68 61 6e 6e 65 6c 20 2a 63 68 61 6e 50 74 Channel *chanPt
09f0: 72 20 3d 20 28 43 68 61 6e 6e 65 6c 20 2a 29 20 r = (Channel *)
0a00: 72 63 50 74 72 2d 3e 63 68 61 6e 3b 0a 20 0a 20 rcPtr->chan;. .
0a10: 20 20 20 20 54 63 6c 43 68 61 6e 6e 65 6c 52 65 TclChannelRe
0a20: 6c 65 61 73 65 28 28 54 63 6c 5f 43 68 61 6e 6e lease((Tcl_Chann
0a30: 65 6c 29 63 68 61 6e 50 74 72 29 3b 0a 64 69 66 el)chanPtr);.dif
0a40: 66 20 2d 2d 67 69 74 20 67 65 6e 65 72 69 63 2f f --git generic/
0a50: 74 63 6c 49 4f 52 54 72 61 6e 73 2e 63 20 67 65 tclIORTrans.c ge
0a60: 6e 65 72 69 63 2f 74 63 6c 49 4f 52 54 72 61 6e neric/tclIORTran
0a70: 73 2e 63 0a 69 6e 64 65 78 20 37 33 30 38 32 30 s.c.index 730820
0a80: 65 62 62 34 2e 2e 32 34 31 39 33 62 61 30 36 66 ebb4..24193ba06f
0a90: 20 31 30 30 36 34 34 0a 2d 2d 2d 20 67 65 6e 65 100644.--- gene
0aa0: 72 69 63 2f 74 63 6c 49 4f 52 54 72 61 6e 73 2e ric/tclIORTrans.
0ab0: 63 0a 2b 2b 2b 20 67 65 6e 65 72 69 63 2f 74 63 c.+++ generic/tc
0ac0: 6c 49 4f 52 54 72 61 6e 73 2e 63 0a 40 40 20 2d lIORTrans.c.@@ -
0ad0: 34 31 37 2c 37 20 2b 34 31 37 2c 37 20 40 40 20 417,7 +417,7 @@
0ae0: 73 74 61 74 69 63 20 52 65 66 6c 65 63 74 65 64 static Reflected
0af0: 54 72 61 6e 73 66 6f 72 6d 20 2a 20 4e 65 77 52 Transform * NewR
0b00: 65 66 6c 65 63 74 65 64 54 72 61 6e 73 66 6f 72 eflectedTransfor
0b10: 6d 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e m(Tcl_Interp *in
0b20: 74 65 72 70 2c 0a 20 09 09 09 20 20 20 20 54 63 terp,. ... Tc
0b30: 6c 5f 4f 62 6a 20 2a 63 6d 64 70 66 78 4f 62 6a l_Obj *cmdpfxObj
0b40: 2c 20 69 6e 74 20 6d 6f 64 65 2c 20 54 63 6c 5f , int mode, Tcl_
0b50: 4f 62 6a 20 2a 68 61 6e 64 6c 65 4f 62 6a 2c 0a Obj *handleObj,.
0b60: 20 09 09 09 20 20 20 20 54 63 6c 5f 43 68 61 6e ... Tcl_Chan
0b70: 6e 65 6c 20 70 61 72 65 6e 74 43 68 61 6e 29 3b nel parentChan);
0b80: 0a 20 73 74 61 74 69 63 20 54 63 6c 5f 4f 62 6a . static Tcl_Obj
0b90: 20 2a 09 4e 65 78 74 48 61 6e 64 6c 65 28 76 6f *.NextHandle(vo
0ba0: 69 64 29 3b 0a 2d 73 74 61 74 69 63 20 76 6f 69 id);.-static voi
0bb0: 64 09 09 46 72 65 65 52 65 66 6c 65 63 74 65 64 d..FreeReflected
0bc0: 54 72 61 6e 73 66 6f 72 6d 28 52 65 66 6c 65 63 Transform(Reflec
0bd0: 74 65 64 54 72 61 6e 73 66 6f 72 6d 20 2a 72 74 tedTransform *rt
0be0: 50 74 72 29 3b 0a 2b 73 74 61 74 69 63 20 54 63 Ptr);.+static Tc
0bf0: 6c 5f 46 72 65 65 50 72 6f 63 09 46 72 65 65 52 l_FreeProc.FreeR
0c00: 65 66 6c 65 63 74 65 64 54 72 61 6e 73 66 6f 72 eflectedTransfor
0c10: 6d 3b 0a 20 73 74 61 74 69 63 20 76 6f 69 64 09 m;. static void.
0c20: 09 46 72 65 65 52 65 66 6c 65 63 74 65 64 54 72 .FreeReflectedTr
0c30: 61 6e 73 66 6f 72 6d 41 72 67 73 28 52 65 66 6c ansformArgs(Refl
0c40: 65 63 74 65 64 54 72 61 6e 73 66 6f 72 6d 20 2a ectedTransform *
0c50: 72 74 50 74 72 29 3b 0a 20 73 74 61 74 69 63 20 rtPtr);. static
0c60: 69 6e 74 09 09 49 6e 76 6f 6b 65 54 63 6c 4d 65 int..InvokeTclMe
0c70: 74 68 6f 64 28 52 65 66 6c 65 63 74 65 64 54 72 thod(ReflectedTr
0c80: 61 6e 73 66 6f 72 6d 20 2a 72 74 50 74 72 2c 0a ansform *rtPtr,.
0c90: 20 09 09 09 20 20 20 20 63 6f 6e 73 74 20 63 68 ... const ch
0ca0: 61 72 20 2a 6d 65 74 68 6f 64 2c 20 54 63 6c 5f ar *method, Tcl_
0cb0: 4f 62 6a 20 2a 61 72 67 4f 6e 65 4f 62 6a 2c 0a Obj *argOneObj,.
0cc0: 40 40 20 2d 37 31 38 2c 37 20 2b 37 31 38 2c 37 @@ -718,7 +718,7
0cd0: 20 40 40 20 54 63 6c 43 68 61 6e 50 75 73 68 4f @@ TclChanPushO
0ce0: 62 6a 43 6d 64 28 0a 20 20 20 20 20 20 2a 20 73 bjCmd(. * s
0cf0: 74 72 75 63 74 75 72 65 2e 0a 20 20 20 20 20 20 tructure..
0d00: 2a 2f 0a 20 0a 2d 20 20 20 20 54 63 6c 5f 45 76 */. .- Tcl_Ev
0d10: 65 6e 74 75 61 6c 6c 79 46 72 65 65 28 72 74 50 entuallyFree(rtP
0d20: 74 72 2c 20 28 54 63 6c 5f 46 72 65 65 50 72 6f tr, (Tcl_FreePro
0d30: 63 20 2a 29 20 46 72 65 65 52 65 66 6c 65 63 74 c *) FreeReflect
0d40: 65 64 54 72 61 6e 73 66 6f 72 6d 29 3b 0a 2b 20 edTransform);.+
0d50: 20 20 20 54 63 6c 5f 45 76 65 6e 74 75 61 6c 6c Tcl_Eventuall
0d60: 79 46 72 65 65 28 72 74 50 74 72 2c 20 46 72 65 yFree(rtPtr, Fre
0d70: 65 52 65 66 6c 65 63 74 65 64 54 72 61 6e 73 66 eReflectedTransf
0d80: 6f 72 6d 29 3b 0a 20 20 20 20 20 72 65 74 75 72 orm);. retur
0d90: 6e 20 54 43 4c 5f 45 52 52 4f 52 3b 0a 20 0a 20 n TCL_ERROR;. .
0da0: 23 75 6e 64 65 66 20 43 48 41 4e 0a 40 40 20 2d #undef CHAN.@@ -
0db0: 39 32 34 2c 37 20 2b 39 32 34 2c 37 20 40 40 20 924,7 +924,7 @@
0dc0: 52 65 66 6c 65 63 74 43 6c 6f 73 65 28 0a 20 09 ReflectClose(. .
0dd0: 7d 0a 20 23 65 6e 64 69 66 20 2f 2a 20 54 43 4c }. #endif /* TCL
0de0: 5f 54 48 52 45 41 44 53 20 2a 2f 0a 20 0a 2d 09 _THREADS */. .-.
0df0: 54 63 6c 5f 45 76 65 6e 74 75 61 6c 6c 79 46 72 Tcl_EventuallyFr
0e00: 65 65 28 72 74 50 74 72 2c 20 28 54 63 6c 5f 46 ee(rtPtr, (Tcl_F
0e10: 72 65 65 50 72 6f 63 20 2a 29 20 46 72 65 65 52 reeProc *) FreeR
0e20: 65 66 6c 65 63 74 65 64 54 72 61 6e 73 66 6f 72 eflectedTransfor
0e30: 6d 29 3b 0a 2b 09 54 63 6c 5f 45 76 65 6e 74 75 m);.+.Tcl_Eventu
0e40: 61 6c 6c 79 46 72 65 65 28 72 74 50 74 72 2c 20 allyFree(rtPtr,
0e50: 46 72 65 65 52 65 66 6c 65 63 74 65 64 54 72 61 FreeReflectedTra
0e60: 6e 73 66 6f 72 6d 29 3b 0a 20 09 72 65 74 75 72 nsform);. .retur
0e70: 6e 20 45 4f 4b 3b 0a 20 20 20 20 20 7d 0a 20 0a n EOK;. }. .
0e80: 40 40 20 2d 39 34 31 2c 37 20 2b 39 34 31 2c 37 @@ -941,7 +941,7
0e90: 20 40 40 20 52 65 66 6c 65 63 74 43 6c 6f 73 65 @@ ReflectClose
0ea0: 28 0a 20 23 69 66 64 65 66 20 54 43 4c 5f 54 48 (. #ifdef TCL_TH
0eb0: 52 45 41 44 53 0a 20 09 20 20 20 20 69 66 20 28 READS. . if (
0ec0: 72 74 50 74 72 2d 3e 74 68 72 65 61 64 20 21 3d rtPtr->thread !=
0ed0: 20 54 63 6c 5f 47 65 74 43 75 72 72 65 6e 74 54 Tcl_GetCurrentT
0ee0: 68 72 65 61 64 28 29 29 20 7b 0a 20 09 09 54 63 hread()) {. ..Tc
0ef0: 6c 5f 45 76 65 6e 74 75 61 6c 6c 79 46 72 65 65 l_EventuallyFree
0f00: 28 72 74 50 74 72 2c 0a 2d 09 09 09 28 54 63 6c (rtPtr,.-...(Tcl
0f10: 5f 46 72 65 65 50 72 6f 63 20 2a 29 20 46 72 65 _FreeProc *) Fre
0f20: 65 52 65 66 6c 65 63 74 65 64 54 72 61 6e 73 66 eReflectedTransf
0f30: 6f 72 6d 29 3b 0a 2b 09 09 09 46 72 65 65 52 65 orm);.+...FreeRe
0f40: 66 6c 65 63 74 65 64 54 72 61 6e 73 66 6f 72 6d flectedTransform
0f50: 29 3b 0a 20 09 09 72 65 74 75 72 6e 20 65 72 72 );. ..return err
0f60: 6f 72 43 6f 64 65 3b 0a 20 09 20 20 20 20 7d 0a orCode;. . }.
0f70: 20 23 65 6e 64 69 66 20 2f 2a 20 54 43 4c 5f 54 #endif /* TCL_T
0f80: 48 52 45 41 44 53 20 2a 2f 0a 40 40 20 2d 39 35 HREADS */.@@ -95
0f90: 35 2c 37 20 2b 39 35 35 2c 37 20 40 40 20 52 65 5,7 +955,7 @@ Re
0fa0: 66 6c 65 63 74 43 6c 6f 73 65 28 0a 20 23 69 66 flectClose(. #if
0fb0: 64 65 66 20 54 43 4c 5f 54 48 52 45 41 44 53 0a def TCL_THREADS.
0fc0: 20 09 20 20 20 20 69 66 20 28 72 74 50 74 72 2d . if (rtPtr-
0fd0: 3e 74 68 72 65 61 64 20 21 3d 20 54 63 6c 5f 47 >thread != Tcl_G
0fe0: 65 74 43 75 72 72 65 6e 74 54 68 72 65 61 64 28 etCurrentThread(
0ff0: 29 29 20 7b 0a 20 09 09 54 63 6c 5f 45 76 65 6e )) {. ..Tcl_Even
1000: 74 75 61 6c 6c 79 46 72 65 65 28 72 74 50 74 72 tuallyFree(rtPtr
1010: 2c 0a 2d 09 09 09 28 54 63 6c 5f 46 72 65 65 50 ,.-...(Tcl_FreeP
1020: 72 6f 63 20 2a 29 20 46 72 65 65 52 65 66 6c 65 roc *) FreeRefle
1030: 63 74 65 64 54 72 61 6e 73 66 6f 72 6d 29 3b 0a ctedTransform);.
1040: 2b 09 09 09 46 72 65 65 52 65 66 6c 65 63 74 65 +...FreeReflecte
1050: 64 54 72 61 6e 73 66 6f 72 6d 29 3b 0a 20 09 09 dTransform);. ..
1060: 72 65 74 75 72 6e 20 65 72 72 6f 72 43 6f 64 65 return errorCode
1070: 3b 0a 20 09 20 20 20 20 7d 0a 20 23 65 6e 64 69 ;. . }. #endi
1080: 66 20 2f 2a 20 54 43 4c 5f 54 48 52 45 41 44 53 f /* TCL_THREADS
1090: 20 2a 2f 0a 40 40 20 2d 39 37 35 2c 37 20 2b 39 */.@@ -975,7 +9
10a0: 37 35 2c 37 20 40 40 20 52 65 66 6c 65 63 74 43 75,7 @@ ReflectC
10b0: 6c 6f 73 65 28 0a 20 09 46 6f 72 77 61 72 64 4f lose(. .ForwardO
10c0: 70 54 6f 4f 77 6e 65 72 54 68 72 65 61 64 28 72 pToOwnerThread(r
10d0: 74 50 74 72 2c 20 46 6f 72 77 61 72 64 65 64 43 tPtr, ForwardedC
10e0: 6c 6f 73 65 2c 20 26 70 29 3b 0a 20 09 72 65 73 lose, &p);. .res
10f0: 75 6c 74 20 3d 20 70 2e 62 61 73 65 2e 63 6f 64 ult = p.base.cod
1100: 65 3b 0a 20 0a 2d 09 54 63 6c 5f 45 76 65 6e 74 e;. .-.Tcl_Event
1110: 75 61 6c 6c 79 46 72 65 65 28 72 74 50 74 72 2c uallyFree(rtPtr,
1120: 20 28 54 63 6c 5f 46 72 65 65 50 72 6f 63 20 2a (Tcl_FreeProc *
1130: 29 20 46 72 65 65 52 65 66 6c 65 63 74 65 64 54 ) FreeReflectedT
1140: 72 61 6e 73 66 6f 72 6d 29 3b 0a 2b 09 54 63 6c ransform);.+.Tcl
1150: 5f 45 76 65 6e 74 75 61 6c 6c 79 46 72 65 65 28 _EventuallyFree(
1160: 72 74 50 74 72 2c 20 46 72 65 65 52 65 66 6c 65 rtPtr, FreeRefle
1170: 63 74 65 64 54 72 61 6e 73 66 6f 72 6d 29 3b 0a ctedTransform);.
1180: 20 0a 20 09 69 66 20 28 72 65 73 75 6c 74 20 21 . .if (result !
1190: 3d 20 54 43 4c 5f 4f 4b 29 20 7b 0a 20 09 20 20 = TCL_OK) {. .
11a0: 20 20 50 61 73 73 52 65 63 65 69 76 65 64 45 72 PassReceivedEr
11b0: 72 6f 72 49 6e 74 65 72 70 28 69 6e 74 65 72 70 rorInterp(interp
11c0: 2c 20 26 70 29 3b 0a 40 40 20 2d 31 30 33 34 2c , &p);.@@ -1034,
11d0: 37 20 2b 31 30 33 34 2c 37 20 40 40 20 52 65 66 7 +1034,7 @@ Ref
11e0: 6c 65 63 74 43 6c 6f 73 65 28 0a 20 23 65 6e 64 lectClose(. #end
11f0: 69 66 20 2f 2a 20 54 43 4c 5f 54 48 52 45 41 44 if /* TCL_THREAD
1200: 53 20 2a 2f 0a 20 20 20 20 20 7d 0a 20 0a 2d 20 S */. }. .-
1210: 20 20 20 54 63 6c 5f 45 76 65 6e 74 75 61 6c 6c Tcl_Eventuall
1220: 79 46 72 65 65 20 28 72 74 50 74 72 2c 20 28 54 yFree (rtPtr, (T
1230: 63 6c 5f 46 72 65 65 50 72 6f 63 20 2a 29 20 46 cl_FreeProc *) F
1240: 72 65 65 52 65 66 6c 65 63 74 65 64 54 72 61 6e reeReflectedTran
1250: 73 66 6f 72 6d 29 3b 0a 2b 20 20 20 20 54 63 6c sform);.+ Tcl
1260: 5f 45 76 65 6e 74 75 61 6c 6c 79 46 72 65 65 20 _EventuallyFree
1270: 28 72 74 50 74 72 2c 20 46 72 65 65 52 65 66 6c (rtPtr, FreeRefl
1280: 65 63 74 65 64 54 72 61 6e 73 66 6f 72 6d 29 3b ectedTransform);
1290: 0a 20 20 20 20 20 72 65 74 75 72 6e 20 65 72 72 . return err
12a0: 6f 72 43 6f 64 65 53 65 74 20 3f 20 65 72 72 6f orCodeSet ? erro
12b0: 72 43 6f 64 65 20 3a 20 28 28 72 65 73 75 6c 74 rCode : ((result
12c0: 20 3d 3d 20 54 43 4c 5f 4f 4b 29 20 3f 20 45 4f == TCL_OK) ? EO
12d0: 4b 20 3a 20 45 49 4e 56 41 4c 29 3b 0a 20 7d 0a K : EINVAL);. }.
12e0: 20 0a 40 40 20 2d 31 39 32 30 2c 38 20 2b 31 39 .@@ -1920,8 +19
12f0: 32 30 2c 39 20 40 40 20 46 72 65 65 52 65 66 6c 20,9 @@ FreeRefl
1300: 65 63 74 65 64 54 72 61 6e 73 66 6f 72 6d 41 72 ectedTransformAr
1310: 67 73 28 0a 20 0c 0a 20 73 74 61 74 69 63 20 76 gs(. .. static v
1320: 6f 69 64 0a 20 46 72 65 65 52 65 66 6c 65 63 74 oid. FreeReflect
1330: 65 64 54 72 61 6e 73 66 6f 72 6d 28 0a 2d 20 20 edTransform(.-
1340: 20 20 52 65 66 6c 65 63 74 65 64 54 72 61 6e 73 ReflectedTrans
1350: 66 6f 72 6d 20 2a 72 74 50 74 72 29 0a 2b 20 20 form *rtPtr).+
1360: 20 20 63 68 61 72 20 2a 62 6c 6f 63 6b 50 74 72 char *blockPtr
1370: 29 0a 20 7b 0a 2b 20 20 20 20 52 65 66 6c 65 63 ). {.+ Reflec
1380: 74 65 64 54 72 61 6e 73 66 6f 72 6d 20 2a 72 74 tedTransform *rt
1390: 50 74 72 20 3d 20 28 52 65 66 6c 65 63 74 65 64 Ptr = (Reflected
13a0: 54 72 61 6e 73 66 6f 72 6d 20 2a 29 20 62 6c 6f Transform *) blo
13b0: 63 6b 50 74 72 3b 0a 20 20 20 20 20 54 69 6d 65 ckPtr;. Time
13c0: 72 4b 69 6c 6c 28 72 74 50 74 72 29 3b 0a 20 20 rKill(rtPtr);.
13d0: 20 20 20 52 65 73 75 6c 74 43 6c 65 61 72 28 26 ResultClear(&
13e0: 72 74 50 74 72 2d 3e 72 65 73 75 6c 74 29 3b 0a rtPtr->result);.
13f0: 20 0a .