summaryrefslogtreecommitdiffstats
path: root/generic/tclResult.c
Commit message (Collapse)AuthorAgeFilesLines
* Allow successfull compilation, even if Tcl_GetErrorLine/Tcl_SetErrorLine are ↵jan.nijtmans2013-07-051-0/+2
| | | | | redefined as macros. FossilOrigin-Name: 30f633409c65f7417faa69a091962296e65fe36b
* Allow Tcl to be compiled even if Tcl_Eval, Tcl_GetVar, ... are macros.jan.nijtmans2013-02-281-0/+3
| | | FossilOrigin-Name: 03b46ac836729ae7fa1112d6f609d6b803095d59
* Eliminate some unneeded usages of Tcl_SetResult, Tcl_AddObjErrorInfojan.nijtmans2013-01-251-1/+1
| | | | | Fix "make test-packages" on cygwin FossilOrigin-Name: 12d1dbc8af7dcbad460a1432075d951dee4ce8ce
* Minor changes to improve style (C89 declarations, consistent indentation,dkf2012-08-071-24/+33
| | | | | | clarification of #endifs, reduction of unnecessary casts, use of array syntax for reading array elements, etc.) FossilOrigin-Name: 3995dbcf90f781e3ada9e350f501dbb1bf5550be
* more result generation conversiondkf2012-08-031-23/+20
| | | FossilOrigin-Name: b3ccaec093ccefb47e906f080f96fad036eaf9fc
* [Bug 3386417] avoid a reference loop between the bytecode and its companion ↵ferrieux2011-08-091-0/+23
| | | | | errostack when compiling a syntax error. FossilOrigin-Name: 41f0f5b9d7d7e50f5c4bc364e20a3e4fbcb448a4
* TclFreeIntRep() cleanup.dgp2011-04-271-1/+0
| | | FossilOrigin-Name: 53b79ea68a8a27842e45d4b2badedb5cb20edeeb
* More generation of error codes (namespace creation, path normalization,dkf2011-04-031-6/+9
| | | | | pipeline creation, package handling, procedures, [scan] formats) FossilOrigin-Name: a6c95ed9e060d601f5fecd29fdadf14567d377ff
* Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-6/+6
| | | | | rest of Tcl source code. No ABI change. API change *should* be harmless. FossilOrigin-Name: 5574bdd262b2672cde48771787370c12854cecf4
* * generic/tclResult.c (ResetObjResult): Correct failure to cleardgp2011-03-081-5/+7
| | | | | invalid intrep. Thanks to Colin McDonald. [Bug 3202905] FossilOrigin-Name: 39e462a5d52bac5100088f9aebd51ef3b6d32121
* USE_DIRECT_INTERP_RESULT_ACCESS -> USE_INTERP_RESULT [TIP 330].dgp2011-03-031-2/+2
| | | FossilOrigin-Name: d8df544b20891b9a242246f651cec3104c21939f
* Now that we're no longer using SCM based on RCS, the RCS Keyword linesdgp2011-03-021-2/+0
|\ | | | | | | | | cause more harm than good. Purged them (except in zlib files). FossilOrigin-Name: c64f310d38b977e7ae26a48bcf8bb8c50e453af7
| * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
| |\ | | | | | | | | | | | | more harm than good. Purged them. FossilOrigin-Name: 79367df0f0e01a96f037f893e889e7cb9b807847
| | * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-011-2/+0
| | | | | | | | | | | | | | | more harm than good. Purged them. FossilOrigin-Name: 90b4acd7bdab65433169a232124967885c18d972
| | * * generic/tclNamespace.c (TclTeardownNamespace): Tcl_Obj-ifieddgp2004-09-301-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/namespace.test (namespace-8.5,6): the save/restore of ::errorInfo and ::errorCode during global namespace teardown. Revised the comment to clarify why this is done, and added tests that will fail if this is not done. * generic/tclResult.c (TclTransferResult): Added safety checks so that unexpected undefined ::errorInfo or ::errorCode will not lead to a segfault. * generic/tclVar.c (CallVarTraces): Save/restore the flag * tests/var.test (var-16.1): values that define part of the interpreter state during variable traces. [Bug 10381021]. FossilOrigin-Name: 713215081c3559112c57e6af56df08a98faa82e1
| | * * generic/tclPreserve.c: In Result and Preserve'd routines, do nothobbs2003-07-161-13/+7
| | | | | | | | | | | | | | | | | | | | | * generic/tclUtil.c: assume that ckfree == free, as that is not * generic/tclResult.c: always true. [Bug 756791] (fuller) FossilOrigin-Name: bb94a3e5100baa4da853c56429f66ced107b7b72
| * | * generic/tclResult.c: [Bug 2383005] Revise [return -errorcode] sodgp2010-03-241-1/+21
| | | | | | | | | | | | | | | | | | * tests/result.test: that it rejects illegal non-list values. FossilOrigin-Name: dbac86a6e832b59cf95da7344c7c4cbdfcd9bdd9
* | | * generic/tclBasic.c, generic/tclClock.c, generic/tclEncoding.c,dkf2010-10-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclEnv.c, generic/tclLoad.c, generic/tclNamesp.c, * generic/tclObj.c, generic/tclRegexp.c, generic/tclResolve.c, * generic/tclResult.c, generic/tclUtil.c, macosx/tclMacOSXFCmd.c: More purging of strcpy() from locations where we already know the length of the data being copied. FossilOrigin-Name: 50bdab468291447e44eee4503c3fcce02a5dea4d
* | | * generic/tclOOMethod.c (ProcedureMethodCompiledVarConnect):hobbs2010-09-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclVar.c (TclLookupSimpleVar, CompareVarKeys): * generic/tclPathObj.c (Tcl_FSGetNormalizedPath, Tcl_FSEqualPaths): * generic/tclExecute.c (TclExecuteByteCode): * generic/tclIOUtil.c (TclFSCwdPointerEquals): peephole opt * generic/tclResult.c (TclMergeReturnOptions): use memcmp where applicable as possible speedup on some libc variants. FossilOrigin-Name: 9dc86adce744657674fe3c8a0dac07f44f47f583
* | | TIP #348 IMPLEMENTATION - Substituted error stackferrieux2010-04-051-2/+81
| | | | | | | | | FossilOrigin-Name: 43fe3048397d3a082c8a3c34f0cd6875f4350dd3
* | | [FRQ 2974744]: share exception codes (ObjType?):nijtmans2010-03-301-50/+1
| | | | | | | | | | | | | | | | | | further optimization, making use of indexType. FossilOrigin-Name: 416a8249cd027578bb7ec52fbf1639e8a22d333d
* | | [Freq 2974744] share exception codes (ObjType?)nijtmans2010-03-271-22/+53
| | | | | | | | | FossilOrigin-Name: a7d613dfe64cbf94c07e507b9a1799bfd8464681
* | | * generic/tclResult.c: [Bug 2383005] Revise [return -errorcode] sodgp2010-03-241-1/+23
| | | | | | | | | | | | | | | | | | * tests/result.test: that it rejects illegal non-list values. FossilOrigin-Name: 7cdddeb2828c3f51badeb27c6a18737537856702
* | | More tidying up (whitespace, spelling, useless parentheses, useless casts)dkf2010-02-241-16/+24
| | | | | | | | | FossilOrigin-Name: 511d94dd873e4ace6252b896eeb821f03023f00f
* | | Revert mistaken commitdgp2009-11-161-7/+2
| | | | | | | | | FossilOrigin-Name: f90f573d18f87ab1e88361e964ee10f0a73cfb63
* | | (forward port) Fix [Bug 2891556] and improve test to detect similar ↵ferrieux2009-11-161-2/+7
| | | | | | | | | | | | | | | manifestations in the future. Add tcltest support for finalization. FossilOrigin-Name: 8fa4d0a5b9522d777f23908a685d9c58ccef2d34
* | | move variable "length" inside if()nijtmans2008-12-171-4/+3
| | | | | | | | | | | | | | | | | | | | | don't use ckfree((void *)...) but ckfree((char *)...) FossilOrigin-Name: 0a08bcb02de15a8c2f35c3659c98e4f85bfb621b
* | | Implement TIP#307.dkf2008-12-051-3/+3
| | | | | | | | | FossilOrigin-Name: 78cbddf83845a359715485e954e72b95a7bdfdc8
* | | TIP #336 IMPLEMENTATIONdgp2008-12-021-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tcl.decls: New routines Tcl_(Get|Set)ErrorLine. * generic/tcl.h: Dropped default access to interp->errorLine. * generic/tclCmdAH.c: Restore it with -DUSE_INTERP_ERRORLINE. * generic/tclCmdMZ.c: Updated callers. * generic/tclDictObj.c: * generic/tclIOUtil.c: * generic/tclNamesp.c: * generic/tclOOBasic.c: * generic/tclOODefinedCmds.c: * generic/tclOOMethod.c: * generic/tclProc.c: * generic/tclResult.c: * generic/tclDecls.h: make genstubs * generic/tclStubInit.c: FossilOrigin-Name: e01657bdcf2de674c508a72af4619599bab4ef5f
* | | Style improvements - invoking callbacks without visual junk.dkf2008-10-261-7/+7
| | | | | | | | | FossilOrigin-Name: a1a8afc25d47810e677f42869f79723f80f3d6a6
* | | Add "const" to many internalnijtmans2008-10-161-2/+2
| | | | | | | | | | | | | | | | | | | | | const tables. No functional or API change. FossilOrigin-Name: f03d2e2d83be42035c4aad3b01bbd09f5a967c1b
* | | TIP #330 IMPLEMENTATIONdgp2008-10-021-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tcl.h: Remove the "result" and "freeProc" fields * generic/tclBasic.c: from the default public declaration of the * generic/tclResult.c: Tcl_Interp struct. Code should no longer * generic/tclStubLib.c: be accessing these fields. Access can be * generic/tclTest.c: restored by defining USE_INTERP_RESULT, but * generic/tclUtil.c: that should only be a temporary migration aid. *** POTENTIAL INCOMPATIBILITY *** FossilOrigin-Name: df44cd3e1642fa9ed3671e02f5139276fb48a097
* | | Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-11/+11
|/ / | | | | FossilOrigin-Name: 2d205c22fbe5def21ccd36bc6f7b2d3831f6122d
* | * generic/tclResult.c (ReleaseKeys): Workaround for [Bugandreas_kupries2008-03-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1904907]. Reset the return option keys to NULL to allow full re-initialization by GetKeys(). This introduces a memory leak for the key objects, but gets us around a crash in the finalization of reflected channels when handling returns, either at compile- or runtime. In both cases we access the keys after they have been released by their thread exit handler. A proper fix is entangled with the untangling of the finalization ordering and attendant issues. For now we choose the lesser evil. FossilOrigin-Name: e3e2980503dfd0f1a9a9a195d12028bda8429444
* | * generic/tclResult.c (Tcl_SetReturnOptions): Revised the refcountdgp2008-02-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | management of Tcl_SetReturnOptions to become that of a conventional Consumer routine. Thanks to Peter Spjuth for pointing out the difficulties calling Tcl_SetReturnOptions with non-0-count value for options. * generic/tclExecute.c (INST_RETURN_STK): Revised the one caller within Tcl itself which passes a non-0-count value to Tcl_SetReturnOptions(). FossilOrigin-Name: 1ef5d374d79ae86f94ec7b4f20e64b8b2f38cbb2
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| | | | | | FossilOrigin-Name: d1f7550cd9bf1343d8505fb99fc5141b58bb88bf
* | RE: [Patch 1830184] TclResetResultmsofer2007-11-121-34/+25
| | | | | | | | | | | | | | | | THIS PATCH WAS REVERTED: initial (mis)measurements overstated the perfomance wins, which turn out to be tiny. Not worth the complication. FossilOrigin-Name: 5ff0531ab624809e194e643878b266b786c50050
* | * generic/tclBasic.c: New macro TclResetResult, new iPtr flagmsofer2007-11-121-25/+34
| | | | | | | | | | | | | | | | | | | | | | * generic/tclExecute.c: bit INTERP_RESULT_UNCLEAN: shortcut for * generic/tclInt.h: Tcl_ResetResult for the "normal" case: * generic/tclProc.c: TCL_OK, no return options, no errorCode * generic/tclResult.c: nor errorInfo, return at normal level. * generic/tclStubLib.c: [Patch 1830184] * generic/tclUtil.c: FossilOrigin-Name: f9acfbe863c0341acb80c8978e48664c082c8069
* | * generic/tclResult.c (ResetObjResult): clarify the logic.msofer2007-11-111-4/+2
| | | | | | FossilOrigin-Name: b0ed568d6dcb8e53f2419a6a6526081585c53f3c
* | [Patch 1830038]: Increased usage of macros to detect and take advantage of ↵msofer2007-11-111-8/+8
| | | | | | | | | | objTypes. FossilOrigin-Name: 11e8f3151249a669790af1ab8897b1451aa5b47b
* | * generic/tclResult.c (ResetObjResult): new shortcut.msofer2007-11-101-3/+4
| | | | | | FossilOrigin-Name: a9ae49ef2789fecb1c8e81c0f660f19aacbcd4b1
* | * generic/tclResult.c (TclMergeReturnOptions): Make sure any -codedgp2007-10-181-1/+3
| | | | | | | | | | | | | | | | | | | | values get pulled out of the dictionary, even if they are integer valued. * generic/tclCompCmds.c (TclCompileReturnCmd): Added code to more optimally compile [return -level 0 $x] to "push $x". [RFE 1794073] FossilOrigin-Name: 51022e44ad2e9ee0b81c53fd04adf3557ad3ab28
* | * generic/tclResult.c (Tcl_GetReturnOptions): Take care that adgp2007-09-071-7/+6
| | | | | | | | | | | | | | | | | | | | * tests/init.test: non-TCL_ERROR code doesn't cause existing -errorinfo, -errorcode, and -errorline entries to be omitted. * generic/tclEvent.c: With -errorInfo no longer lost, generate more complete ::errorInfo when calling [bgerror] after a non-TCL_ERROR background exception. FossilOrigin-Name: f4e64b0c796abb30d68ac3011b09e7913e25a937
* | * generic/tclBasic.c: Added interp flag value ERR_LEGACY_COPY todgp2007-06-051-6/+13
| | | | | | | | | | | | | | | | | | | | * generic/tclInt.h: control the timing with which the global * generic/tclNamesp.c: variables ::errorCode and ::errorInfo get * generic/tclProc.c: updated after an error. This keeps more * generic/tclResult.c: precise compatibility with Tcl 8.4. * tests/result.test (result-6.2): [Bug 1649062] FossilOrigin-Name: 00c4f9f27e47ffc8fb55b4ab5eec8314d7b646bf
* | Replaced commas in varargs with string concatenation where possible [Patch ↵kennykb2007-04-201-3/+3
| | | | | | | | | | 1515234] FossilOrigin-Name: d0d3c30f1a60ecb75cdca7e63593bb7d7a98f017
* | assorted minor cleanupdkf2007-04-101-12/+16
| | | | | | FossilOrigin-Name: 033ee817fdcadadb239efb89ce91fabae61ff449
* | Handle creation of Tcl_Objs from constant strings better (easier to use, moredkf2007-04-101-7/+7
| | | | | | | | | | | | efficient). After [Patch 1529526] (afredd) FossilOrigin-Name: 4d69119aadb4298f8e994440eb988c6c46396086
* | * generic/tclResult.c: Added optimization case to TclTransferResultdgp2007-01-291-5/+17
| | | | | | | | | | | | | | to cover common case where there's big savings over the fully general path. Thanks to Peter MacDonald. [Bug 1626518]. FossilOrigin-Name: c8324c7bedad868d69e7da7fd8c127fe5add4276
* | ANSIfydkf2005-11-021-86/+87
| | | | | | FossilOrigin-Name: c8e360304c4d2d1f33cf1fb3a998e2fe3c548471
* | * generic/tcl.h: Explicitly standardized on the use of stdarg.hdgp2005-09-131-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclBasic.c: conventions for functions with variable number * generic/tclInt.h: of arguments. Support for varargs.h has been * generic/tclPanic.c: implicitly gone for some time now. All * generic/tclResult.c: TCL_VARARGS* macros purged from Tcl sources, * generic/tclStringObj.c: leaving only some deprecated #define's * tools/genStubs.tcl: in tcl.h for the sake of older extensions. * generic/tclDecls.h: make genstubs * doc/AddErrInfo.3: Replaced all documented requirement for use * doc/Eval.3: of TCL_VARARGS_START() with requirement for * doc/Panic.3: use of va_start(). * doc/SetResult.3: * doc/StringObj.3: FossilOrigin-Name: bdf9458b147a42c52fbe53b2a4032d4fc754dcd2