summaryrefslogtreecommitdiffstats
path: root/generic/tclBinary.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | | [Bug 3129448]: possible over-allocation on 64-bit platformsnijtmans2010-12-061-3/+3
| | |
* | | Tcl_Panic already writes a newline at the end, so the caller doesn't have to ↵nijtmans2010-11-191-2/+2
| | | | | | | | | | | | do that
* | | * generic/tclBinary.c (TclAppendBytesToByteArray): [Bug 3067036]: Makedkf2010-09-151-4/+19
| | | | | | | | | | | | | | | sure we never try to double zero repeatedly to get a buffer size. Also added a check for sanity on the size of buffer being appended.
* | | Remove many type casts which are no longernecessary as a result of [Patch ↵nijtmans2010-08-221-2/+2
| | | | | | | | | | | | 3009403]: Signature of Tcl_GetHashKey, Tcl_(Create|Find)HashEntry
* | | * generic/tclBinary.c (TclAppendBytesToByteArray): Add commentsdgp2010-04-301-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.h (TclAppendBytesToByteArray): placing overflow protection responsibility on caller. Convert "len" argument to signed int which any value already vetted for overflow issues will fit into. * generic/tclStringObj.c: Update caller; standardize panic msg. * generic/tclBinary.c (UpdateStringOfByteArray): Add panic when the generated string representation would grow beyond Tcl's size limits. [Bug 2994924]
* | | * generic/tclBinary.c (TclAppendBytesToByteArray): Add extra armourdkf2010-04-301-6/+11
| | | | | | | | | | | | against buffer overflows.
* | | fix MSVC warning C4018: '>' : signed/unsigned mismatchnijtmans2010-04-291-2/+2
| | |
* | | * generic/tclBinary.c (TclAppendBytesToByteArray): [Bug 2992970]: Makedkf2010-04-291-1/+76
| | | | | | | | | | | | | | | | | | * generic/tclStringObj.c (Tcl_AppendObjToObj): an append of a byte array to another into an efficent operation. The problem was the (lack of) a proper growth management strategy for the byte array.
* | | Code Audit results:dkf2010-03-051-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | * use do { ... } while (0) in macros * avoid shadowing one local variable with another * use clearer 'foo.bar++;' instead of '++foo.bar;' where result not required (i.e., semantically equivalent) * follow Engineering Manual rules on spacing and declarations
* | | Handle completely invalid input to the decode methods [Bug 2922555]patthoyts2009-12-291-1/+4
| | |
* | | Fix gcc warning, using gcc-4.3.4 on cygwinnijtmans2009-12-111-2/+2
| | | | | | | | | | | | | | | warning: array subscript has type 'char' win/makefile.vc Revert to version 1.203 [Bug #2912773]
* | | Fix gcc warning, using gcc-4.3.4 on cygwinnijtmans2009-12-111-2/+2
| | | | | | | | | | | | | | | warning: array subscript has type 'char' win/makefile.vc Revert to version 1.203 [Bug #2912773]
* | | Eliminate various gcc warnings (in -Wextra mode)nijtmans2009-11-181-11/+12
| | |
* | | * generic/tclBinary.c: Removed unused variables.dgp2009-07-161-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdIL.c: * generic/tclCompile.c: * generic/tclExecute.c: * generic/tclHash.c: * generic/tclIOUtil.c: * generic/tclVar.c: * generic/tclBasic.c: Silence compiler warnings about ClientData. * generic/tclProc.c: * generic/tclScan.c: Typo in ACCEPT_NAN configuration. * generic/tclStrToD.c: Set floating point control register on MIPS systems so that the gradual underflow expected by Tcl is in effect. [Bug 2819200]
* | | - eliminate some unnessary type castsnijtmans2009-02-031-9/+9
| | | | | | | | | | | | | | | - some internal const decorations - spacing
* | | Style fixes (unfouling whitespace, sorting comments, removing useless casts, ↵dkf2009-01-091-4/+3
| | | | | | | | | | | | etc.)
* | | Fix [Bug 2380293]. Redefine non-strict decoding to ignore only whitespace.ferrieux2008-12-151-4/+5
| | |
* | | Tidy up formatting.dkf2008-11-161-612/+595
| | |
* | | patch #2215022: clean up the binary ensemble initialization codepatthoyts2008-11-071-90/+38
| | | | | | | | | | | | | | | Applied a patch from Duoas which extends the TclMakeEnsemble command to handle sub-ensembles from tables. Cleaned up the original patch a bit.
* | | Style improvements - invoking callbacks without visual junk.dkf2008-10-261-50/+48
| | |
* | | Add "const" to many internalnijtmans2008-10-151-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | const tables, so those will be put by the C-compiler in the TEXT segment in stead of the DATA segment. This makes those table sharable in shared libraries.
* | | Some cleaning up of the binary encode/decode enginesdkf2008-10-071-121/+160
| | |
* | | fix [2021443] inconsistant "wrong # args" messagesnijtmans2008-07-191-3/+3
| | |
* | | fix warnings, remove unused debug code that causes build failuredas2008-06-051-24/+10
| | |
* | | TIP #317 implementationpatthoyts2008-06-031-7/+567
| | |
* | | Converted the [binary] command into an ensemble.patthoyts2008-05-021-147/+228
| | |
* | | Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-2/+2
|/ /
* | improved fix keeping short-circuitpatthoyts2008-03-241-3/+5
| |
* | bug #1923966 - crash in binary format. Added tests for the above crash ↵patthoyts2008-03-241-2/+2
| | | | | | | | condition.
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| |
* | [Patch 1830038]: Increased usage of macros to detect and take advantage of ↵Miguel Sofer2007-11-111-14/+19
| | | | | | | | objTypes.
* | * generic/tclBinary.c (Tcl_GetByteArrayFromObj): check type beforehobbs2007-11-091-2/+4
| | | | | | | | func jump
* | header cleanupdgp2007-09-071-2/+2
| |
* | * generic/tclBinary.c: Addressed several code paths where theKevin B Kenny2007-04-241-1/+6
| | | | | | | | | | error return from the 'binary format' command leaked the result buffer.
* | * generic/tclBinary.c (Tcl_SetByteArrayLength): Replaced ckalloc() /dgp2007-03-191-9/+5
| | | | | | | | memcpy() sequence with ckrealloc() call.
* | various "const" additions, in line with TIP #27nijtmans2007-02-201-17/+18
| |
* | Minor changes (whitespace police, etc.)dkf2006-11-071-59/+56
| |
* | Silence GCC (cast is always safe; value is known to fit with wiggle room)dkf2006-10-101-2/+2
| |
* | TIP #275: Support unsigned values in binary commandpatthoyts2006-10-061-19/+57
| |
* | Various minor object file size efficiency fixes. [Bug 1530474]dkf2006-08-101-4/+4
| |
* | * generic/tclBinary.c: Revised the handling of the Q and q formatdgp2006-04-261-10/+62
| | | | | | | | | | | | * generic/tclInt.h: specifiers for [binary] to account for the * generic/tclStrToD.c: "middle endian" floating point format used in Nokia N770.
* | * generic/tclBinary.c:Miguel Sofer2005-11-041-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIOCmd.c: * generic/tclLink.c: * generic/tclTest.c: * generic/tclVar.c: fix for [Bug 1334947]. The functions TclPtrSetVar, Tcl_ObjSetVar2 and Tcl_SetVar2Ex now always consume the newValuePtr argument - i.e., they will free a 0-refCount object if they failed to set the variable. Fixed all callers in the core.
* | Formatting fixesdkf2005-09-271-127/+126
| |
* | Getting more systematic about styledkf2005-07-171-847/+829
| |
* | * generic/tclBasic.c: Dropped the TCL_NO_MATH configuration.dgp2005-05-131-5/+1
| | | | | | | | | | | | * generic/tclBinary.c: It's believed this has not been working * generic/tclExecute.c: in a long time. Tcl needs math.h. * unix/Makefile.in: [RFE 1200680].
* | Fixed uninitialized memory read in tclBinary.c when passing a NaN to ↵Kevin B Kenny2005-05-101-1/+2
| | | | | | | | 'd','q','Q' formats
* | Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-3/+12
| |
* | * generic/tclBasic.c:dgp2004-10-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclBinary.c: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompExpr.c: * generic/tclDictObj.c: It is a poor practice to directly set or append to the value of the objResult of an interp, because that value might be shared, and in that circumstance a Tcl_Panic() will be the result. Searched for example of this practice and replaced with safer alternatives, often using the Tcl_AppendResult() routine that dkf just rehabilitated.
* | * generic/tclBasic.c:dgp2004-10-061-5/+5
| | | | | | | | | | | | | | | | | | | | | | * generic/tclBinary.c: * generic/tclCmdAH.c: It is a poor practice to directly set or append to the value of the objResult of an interp, because that value might be shared, and in that circumstance a Tcl_Panic() will be the result. Searched for example of this practice and replaced with safer alternatives, often using the Tcl_AppendResult() routine that dkf just rehabilitated.
* | Factorize out the code for freeing an object's internal rep.dkf2004-09-291-12/+4
| |