summaryrefslogtreecommitdiffstats
path: root/generic/tclResult.c
Commit message (Collapse)AuthorAgeFilesLines
* Allow Tcl to be compiled even if Tcl_Eval, Tcl_GetVar, ... are macros.jan.nijtmans2013-02-281-0/+3
|
* Eliminate some unneeded usages of Tcl_SetResult, Tcl_AddObjErrorInfojan.nijtmans2013-01-251-1/+1
| | | Fix "make test-packages" on cygwin
* 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.)
* more result generation conversiondkf2012-08-031-23/+20
|
* [Bug 3386417] avoid a reference loop between the bytecode and its companion ↵ferrieux2011-08-091-0/+23
| | | | errostack when compiling a syntax error.
* TclFreeIntRep() cleanup.dgp2011-04-271-1/+0
|
* More generation of error codes (namespace creation, path normalization,dkf2011-04-031-6/+9
| | | pipeline creation, package handling, procedures, [scan] formats)
* 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.
* * generic/tclResult.c (ResetObjResult): Correct failure to cleardgp2011-03-081-5/+7
| | | invalid intrep. Thanks to Colin McDonald. [Bug 3202905]
* USE_DIRECT_INTERP_RESULT_ACCESS -> USE_INTERP_RESULT [TIP 330].dgp2011-03-031-2/+2
|
* 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).
| * 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.
| | * 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.
| | * * 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].
| | * * 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)
| * | * generic/tclResult.c: [Bug 2383005] Revise [return -errorcode] sodgp2010-03-241-1/+21
| | | | | | | | | | | | * tests/result.test: that it rejects illegal non-list values.
* | | * 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.
* | | * 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.
* | | TIP #348 IMPLEMENTATION - Substituted error stackferrieux2010-04-051-2/+81
| | |
* | | [FRQ 2974744]: share exception codes (ObjType?):nijtmans2010-03-301-50/+1
| | | | | | | | | | | | further optimization, making use of indexType.
* | | [Freq 2974744] share exception codes (ObjType?)nijtmans2010-03-271-22/+53
| | |
* | | * generic/tclResult.c: [Bug 2383005] Revise [return -errorcode] sodgp2010-03-241-1/+23
| | | | | | | | | | | | * tests/result.test: that it rejects illegal non-list values.
* | | More tidying up (whitespace, spelling, useless parentheses, useless casts)dkf2010-02-241-16/+24
| | |
* | | Revert mistaken commitdgp2009-11-161-7/+2
| | |
* | | (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.
* | | move variable "length" inside if()nijtmans2008-12-171-4/+3
| | | | | | | | | | | | | | | don't use ckfree((void *)...) but ckfree((char *)...)
* | | Implement TIP#307.dkf2008-12-051-3/+3
| | |
* | | 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:
* | | Style improvements - invoking callbacks without visual junk.dkf2008-10-261-7/+7
| | |
* | | Add "const" to many internalnijtmans2008-10-161-2/+2
| | | | | | | | | | | | | | | const tables. No functional or API change.
* | | 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 ***
* | | Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-11/+11
|/ /
* | * 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.
* | * 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().
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| |
* | RE: [Patch 1830184] TclResetResultMiguel Sofer2007-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.
* | * generic/tclBasic.c: New macro TclResetResult, new iPtr flagMiguel Sofer2007-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:
* | * generic/tclResult.c (ResetObjResult): clarify the logic.Miguel Sofer2007-11-111-4/+2
| |
* | [Patch 1830038]: Increased usage of macros to detect and take advantage of ↵Miguel Sofer2007-11-111-8/+8
| | | | | | | | objTypes.
* | * generic/tclResult.c (ResetObjResult): new shortcut.Miguel Sofer2007-11-101-3/+4
| |
* | * 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]
* | * 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.
* | * 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]
* | Replaced commas in varargs with string concatenation where possible [Patch ↵Kevin B Kenny2007-04-201-3/+3
| | | | | | | | 1515234]
* | assorted minor cleanupdkf2007-04-101-12/+16
| |
* | Handle creation of Tcl_Objs from constant strings better (easier to use, moredkf2007-04-101-7/+7
| | | | | | | | efficient). After [Patch 1529526] (afredd)
* | * 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].
* | ANSIfydkf2005-11-021-86/+87
| |
* | * 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:
* | * unix/tclUnixSock.c (InitializeHostName): Synchronized use ofandreas_kupries2005-09-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | static modifier in declaration and definition of function. * unix/tclUnixChan.c (FileTruncateProc): Synchronized use of static modifier in declaration and definition of function. * generic/tclResult.c (ReleaseKeys): Synchronized use of static modifier in declaration and definition of function. * generic/tclListObj.c (NewListIntRep): Synchronized use of static modifier in declaration and definition of function. * generic/tclEncoding.c (InitializeEncodingSearchPath): Synchronized use of static modifier in declaration and definition of function. * generic/tclEncoding.c (FillEncodingFileMap): Synchronized use of static modifier in declaration and definition of function. * generic/tclIORChan.c (RcNewHandle): Synchronized use of static modifier in declaration and definition of function.