diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2011-03-12 15:06:47 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2011-03-12 15:06:47 (GMT) |
commit | 2ff0db90f57b60e46b714f2b5cdb1d2c5eacce98 (patch) | |
tree | ed891ab3e00ea5888426f25d675aff2d89a00b1d /win/tclWinReg.c | |
parent | 0d3106376c20bbe48cba344885fcad371b72b50f (diff) | |
download | tcl-2ff0db90f57b60e46b714f2b5cdb1d2c5eacce98.zip tcl-2ff0db90f57b60e46b714f2b5cdb1d2c5eacce98.tar.gz tcl-2ff0db90f57b60e46b714f2b5cdb1d2c5eacce98.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 'win/tclWinReg.c')
-rw-r--r-- | win/tclWinReg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/win/tclWinReg.c b/win/tclWinReg.c index 7c075b0..7462031 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -409,7 +409,7 @@ DeleteKey( */ keyName = Tcl_GetStringFromObj(keyNameObj, &length); - buffer = ckalloc((unsigned) length + 1); + buffer = ckalloc(length + 1); strcpy(buffer, keyName); if (ParseKeyName(interp, buffer, &hostName, &rootKey, @@ -591,7 +591,7 @@ GetKeyNames( RegCloseKey(key); return TCL_ERROR; } - buffer = (TCHAR *) ckalloc((maxSubKeyLen+1) * sizeof(TCHAR)); + buffer = ckalloc((maxSubKeyLen+1) * sizeof(TCHAR)); /* * Enumerate the subkeys. @@ -627,7 +627,7 @@ GetKeyNames( Tcl_SetObjResult(interp, resultPtr); } - ckfree((char *)buffer); + ckfree(buffer); RegCloseKey(key); return result; } @@ -973,7 +973,7 @@ OpenKey( DWORD result; keyName = Tcl_GetStringFromObj(keyNameObj, &length); - buffer = ckalloc((unsigned) length + 1); + buffer = ckalloc(length + 1); strcpy(buffer, keyName); result = ParseKeyName(interp, buffer, &hostName, &rootKey, &keyName); |