Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch tip-640 Excluding Merge-Ins
This is equivalent to a diff from 54527726b5 to 70a191fcfc
2022-10-06
| ||
13:36 | TIP #640: Remove Tcl_SaveResult check-in: 40a9b8b856 user: jan.nijtmans tags: trunk, main | |
2022-09-27
| ||
04:04 | Merge 8.7 (primarily TIP 631) check-in: 87c1bd5b64 user: apnadkarni tags: trunk, main | |
2022-09-26
| ||
19:00 | Merge 9.0 check-in: e44206c7e0 user: jan.nijtmans tags: tcl8-compat | |
16:10 | Merge 9.0. Change implementation: Now really remove Tcl_SaveResult() and friends Closed-Leaf check-in: 70a191fcfc user: jan.nijtmans tags: tip-640 | |
15:58 | Merge 8.7 check-in: 54527726b5 user: jan.nijtmans tags: trunk, main | |
15:51 | Make Tcl_SaveResult() and friends _really_ deprecated, so make gcc/clang warn when it's used check-in: f9e08e003f user: jan.nijtmans tags: core-8-branch | |
12:24 | Merge 8.7 check-in: 039ab7c627 user: jan.nijtmans tags: trunk, main | |
2022-09-21
| ||
15:25 | TIP #640 implementation: Tcl_SaveResult reuse for Tcl 9.0 check-in: b2727e8d27 user: jan.nijtmans tags: tip-640 | |
Changes to doc/SaveResult.3.
1 2 3 4 5 6 7 8 | '\" '\" Copyright (c) 1997 Sun Microsystems, Inc. '\" Contributions from Don Porter, NIST, 2004. (not subject to US copyright) '\" Copyright (c) 2018 Nathan Coulter. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" | | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | '\" '\" Copyright (c) 1997 Sun Microsystems, Inc. '\" Contributions from Don Porter, NIST, 2004. (not subject to US copyright) '\" Copyright (c) 2018 Nathan Coulter. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .TH Tcl_SaveInterpState 3 8.1 Tcl "Tcl Library Procedures" .so man.macros .BS .SH NAME Tcl_SaveInterpState, Tcl_RestoreInterpState, Tcl_DiscardInterpState \- Save and restore the state of an an interpreter. .SH SYNOPSIS .nf \fB#include <tcl.h>\fR .sp Tcl_InterpState \fBTcl_SaveInterpState\fR(\fIinterp, status\fR) .sp int \fBTcl_RestoreInterpState\fR(\fIinterp, state\fR) .sp \fBTcl_DiscardInterpState\fR(\fIstate\fR) .SH ARGUMENTS .AS Tcl_InterpState savedPtr .AP Tcl_Interp *interp in The interpreter for the operation. .AP int status in The return code for the state. .AP Tcl_InterpState state in A token for saved state. .BE .SH DESCRIPTION .PP These routines save the state of an interpreter before a call to a routine such as \fBTcl_Eval\fR, and restore the state afterwards. .PP \fBTcl_SaveInterpState\fR saves the parts of \fIinterp\fR that comprise the result of a script, including the resulting value, the return code passed as \fIstatus\fR, and any options such as \fB\-errorinfo\fR and \fB\-errorcode\fR. It returns a token for the saved state. The interpreter result is not reset and no interpreter state is changed. .PP \fBTcl_RestoreInterpState\fR restores the state indicated by \fIstate\fR and returns the \fIstatus\fR originally passed in the corresponding call to \fBTcl_SaveInterpState\fR. .PP If a saved state is not restored, \fBTcl_DiscardInterpState\fR must be called to release it. A token used to discard or restore state must not be used again. .SH KEYWORDS result, state, interp |
Changes to generic/tcl.h.
︙ | ︙ | |||
666 667 668 669 670 671 672 | * corresponds to the type of the object's * internal rep. NULL indicates the object has * no internal rep (has no type). */ Tcl_ObjInternalRep internalRep; /* The internal representation: */ } Tcl_Obj; | < < < < < < < < | 666 667 668 669 670 671 672 673 674 675 676 677 678 679 | * corresponds to the type of the object's * internal rep. NULL indicates the object has * no internal rep (has no type). */ Tcl_ObjInternalRep internalRep; /* The internal representation: */ } Tcl_Obj; /* *---------------------------------------------------------------------------- * The following definitions support Tcl's namespace facility. Note: the first * five fields must match exactly the fields in a Namespace structure (see * tclInt.h). */ |
︙ | ︙ |
Changes to generic/tclDecls.h.
︙ | ︙ | |||
3888 3889 3890 3891 3892 3893 3894 | #define Tcl_AddObjErrorInfo(interp, message, length) \ Tcl_AppendObjToErrorInfo(interp, Tcl_NewStringObj(message, length)) #define Tcl_Eval(interp, objPtr) \ Tcl_EvalEx(interp, objPtr, TCL_INDEX_NONE, 0) #define Tcl_GlobalEval(interp, objPtr) \ Tcl_EvalEx(interp, objPtr, TCL_INDEX_NONE, TCL_EVAL_GLOBAL) #define Tcl_GetStringResult(interp) Tcl_GetString(Tcl_GetObjResult(interp)) | < < < < < < < < < < < < < < < < < < < < < < | 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 | #define Tcl_AddObjErrorInfo(interp, message, length) \ Tcl_AppendObjToErrorInfo(interp, Tcl_NewStringObj(message, length)) #define Tcl_Eval(interp, objPtr) \ Tcl_EvalEx(interp, objPtr, TCL_INDEX_NONE, 0) #define Tcl_GlobalEval(interp, objPtr) \ Tcl_EvalEx(interp, objPtr, TCL_INDEX_NONE, TCL_EVAL_GLOBAL) #define Tcl_GetStringResult(interp) Tcl_GetString(Tcl_GetObjResult(interp)) #define Tcl_SetResult(interp, result, freeProc) \ do { \ const char *__result = result; \ Tcl_FreeProc *__freeProc = freeProc; \ Tcl_SetObjResult(interp, Tcl_NewStringObj(__result, TCL_INDEX_NONE)); \ if (__result != NULL && __freeProc != NULL && __freeProc != TCL_VOLATILE) { \ if (__freeProc == TCL_DYNAMIC) { \ |
︙ | ︙ |
Changes to generic/tclTest.c.
︙ | ︙ | |||
130 131 132 133 134 135 136 | typedef struct { Tcl_Interp *interp; char *toUtfCmd; char *fromUtfCmd; } TclEncoding; | < < < < < < < | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | typedef struct { Tcl_Interp *interp; char *toUtfCmd; char *fromUtfCmd; } TclEncoding; /* * Boolean flag used by the "testsetmainloop" and "testexitmainloop" commands. */ static int exitMainLoop = 0; /* |
︙ | ︙ | |||
166 167 168 169 170 171 172 | typedef struct TestChannel { Tcl_Channel chan; /* Detached channel */ struct TestChannel *nextPtr;/* Next in detached channel pool */ } TestChannel; static TestChannel *firstDetached; | < < < < < < < < < | 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | typedef struct TestChannel { Tcl_Channel chan; /* Detached channel */ struct TestChannel *nextPtr;/* Next in detached channel pool */ } TestChannel; static TestChannel *firstDetached; /* * Forward declarations for procedures defined later in this file: */ static int AsyncHandlerProc(void *clientData, Tcl_Interp *interp, int code); static Tcl_ThreadCreateType AsyncThreadProc(void *); |
︙ | ︙ | |||
286 287 288 289 290 291 292 | static Tcl_ObjCmdProc TestparsevarnameObjCmd; static Tcl_ObjCmdProc TestpreferstableObjCmd; static Tcl_ObjCmdProc TestprintObjCmd; static Tcl_ObjCmdProc TestregexpObjCmd; static Tcl_ObjCmdProc TestreturnObjCmd; static void TestregexpXflags(const char *string, size_t length, int *cflagsPtr, int *eflagsPtr); | < < | 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | static Tcl_ObjCmdProc TestparsevarnameObjCmd; static Tcl_ObjCmdProc TestpreferstableObjCmd; static Tcl_ObjCmdProc TestprintObjCmd; static Tcl_ObjCmdProc TestregexpObjCmd; static Tcl_ObjCmdProc TestreturnObjCmd; static void TestregexpXflags(const char *string, size_t length, int *cflagsPtr, int *eflagsPtr); static Tcl_CmdProc TestsetassocdataCmd; static Tcl_CmdProc TestsetCmd; static Tcl_CmdProc Testset2Cmd; static Tcl_CmdProc TestseterrorcodeCmd; static Tcl_ObjCmdProc TestsetobjerrorcodeCmd; static Tcl_CmdProc TestsetplatformCmd; static Tcl_CmdProc TeststaticlibraryCmd; |
︙ | ︙ | |||
680 681 682 683 684 685 686 | NULL, NULL); Tcl_CreateObjCommand(interp, "testprint", TestprintObjCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "testregexp", TestregexpObjCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "testreturn", TestreturnObjCmd, NULL, NULL); | < < | 662 663 664 665 666 667 668 669 670 671 672 673 674 675 | NULL, NULL); Tcl_CreateObjCommand(interp, "testprint", TestprintObjCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "testregexp", TestregexpObjCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "testreturn", TestreturnObjCmd, NULL, NULL); Tcl_CreateCommand(interp, "testservicemode", TestServiceModeCmd, NULL, NULL); Tcl_CreateCommand(interp, "testsetassocdata", TestsetassocdataCmd, NULL, NULL); Tcl_CreateCommand(interp, "testsetnoerr", TestsetCmd, NULL, NULL); Tcl_CreateCommand(interp, "testseterr", TestsetCmd, |
︙ | ︙ | |||
5463 5464 5465 5466 5467 5468 5469 | return TCL_OK; } else { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], " varName elemName ?newValue?\"", NULL); return TCL_ERROR; } } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 | return TCL_OK; } else { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], " varName elemName ?newValue?\"", NULL); return TCL_ERROR; } } /* *---------------------------------------------------------------------- * * TestmainthreadCmd -- * * Implements the "testmainthread" cmd that is used to test the |
︙ | ︙ |