diff options
| author | donal.k.fellows@manchester.ac.uk <dkf> | 2011-03-12 15:06:47 (GMT) |
|---|---|---|
| committer | donal.k.fellows@manchester.ac.uk <dkf> | 2011-03-12 15:06:47 (GMT) |
| commit | da07e275b37faecb755a5d1cd6e55bf5dced5b6e (patch) | |
| tree | ed891ab3e00ea5888426f25d675aff2d89a00b1d /generic/tclScan.c | |
| parent | cc586c9ab635695477a2735f73aa166f4ecb4a5e (diff) | |
| download | tcl-da07e275b37faecb755a5d1cd6e55bf5dced5b6e.zip tcl-da07e275b37faecb755a5d1cd6e55bf5dced5b6e.tar.gz tcl-da07e275b37faecb755a5d1cd6e55bf5dced5b6e.tar.bz2 | |
Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts in
rest of Tcl source code. No ABI change. API change *should* be harmless.
Diffstat (limited to 'generic/tclScan.c')
| -rw-r--r-- | generic/tclScan.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/generic/tclScan.c b/generic/tclScan.c index 0051415..c862be4 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -101,10 +101,9 @@ BuildCharSet( end += Tcl_UtfToUniChar(end, &ch); } - cset->chars = (Tcl_UniChar *) - ckalloc(sizeof(Tcl_UniChar) * (end - format - 1)); + cset->chars = ckalloc(sizeof(Tcl_UniChar) * (end - format - 1)); if (nranges > 0) { - cset->ranges = (struct Range *) ckalloc(sizeof(struct Range)*nranges); + cset->ranges = ckalloc(sizeof(struct Range) * nranges); } else { cset->ranges = NULL; } @@ -224,9 +223,9 @@ static void ReleaseCharSet( CharSet *cset) { - ckfree((char *)cset->chars); + ckfree(cset->chars); if (cset->ranges) { - ckfree((char *)cset->ranges); + ckfree(cset->ranges); } } @@ -590,7 +589,7 @@ Tcl_ScanObjCmd( */ if (totalVars > 0) { - objs = (Tcl_Obj **) ckalloc(sizeof(Tcl_Obj *) * totalVars); + objs = ckalloc(sizeof(Tcl_Obj *) * totalVars); for (i = 0; i < totalVars; i++) { objs[i] = NULL; } @@ -1020,7 +1019,7 @@ Tcl_ScanObjCmd( } } if (objs != NULL) { - ckfree((char *) objs); + ckfree(objs); } if (code == TCL_OK) { if (underflow && (nconversions == 0)) { |
