summaryrefslogtreecommitdiffstats
path: root/win/tclWinInit.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-09-01 22:01:35 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-09-01 22:01:35 (GMT)
commitba417d3ce6d273a724c772efed9f3fbca65b94a8 (patch)
tree954bdbecb4cb9c3a063b6ad4b237f6c7a7c05ae1 /win/tclWinInit.c
parente663097026638d349d2ac63a28f5c5fcd6f15677 (diff)
parent195f90c9510d639c9807253136edfce377cbeef9 (diff)
downloadtcl-ba417d3ce6d273a724c772efed9f3fbca65b94a8.zip
tcl-ba417d3ce6d273a724c772efed9f3fbca65b94a8.tar.gz
tcl-ba417d3ce6d273a724c772efed9f3fbca65b94a8.tar.bz2
Change ckalloc and friends to Tcl_Alloc and friends. Add two defines, TCL_IO_FAILURE and TCL_NO_LENGTH (experimental, still open to be renamed following discussion)
Diffstat (limited to 'win/tclWinInit.c')
-rw-r--r--win/tclWinInit.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index 3ce0efa..e681b08 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -225,7 +225,7 @@ TclpInitLibraryPath(
*encodingPtr = NULL;
bytes = TclGetString(pathPtr);
*lengthPtr = pathPtr->length;
- *valuePtr = ckalloc(*lengthPtr + 1);
+ *valuePtr = Tcl_Alloc(*lengthPtr + 1);
memcpy(*valuePtr, bytes, *lengthPtr + 1);
Tcl_DecrRefCount(pathPtr);
}
@@ -316,7 +316,7 @@ AppendEnvironment(
objPtr = Tcl_NewStringObj(buf, -1);
}
Tcl_ListObjAppendElement(NULL, pathPtr, objPtr);
- ckfree(pathv);
+ Tcl_Free(pathv);
}
}
@@ -362,7 +362,7 @@ InitializeDefaultLibraryDir(
TclWinNoBackslash(name);
sprintf(end + 1, "lib/tcl%s", TCL_VERSION);
*lengthPtr = strlen(name);
- *valuePtr = ckalloc(*lengthPtr + 1);
+ *valuePtr = Tcl_Alloc(*lengthPtr + 1);
*encodingPtr = NULL;
memcpy(*valuePtr, name, *lengthPtr + 1);
}
@@ -410,7 +410,7 @@ InitializeSourceLibraryDir(
TclWinNoBackslash(name);
sprintf(end + 1, "../library");
*lengthPtr = strlen(name);
- *valuePtr = ckalloc(*lengthPtr + 1);
+ *valuePtr = Tcl_Alloc(*lengthPtr + 1);
*encodingPtr = NULL;
memcpy(*valuePtr, name, *lengthPtr + 1);
}
@@ -636,7 +636,7 @@ TclpFindVariable(
*/
length = strlen(name);
- nameUpper = ckalloc(length + 1);
+ nameUpper = Tcl_Alloc(length + 1);
memcpy(nameUpper, name, length+1);
Tcl_UtfToUpper(nameUpper);
@@ -675,7 +675,7 @@ TclpFindVariable(
done:
Tcl_DStringFree(&envString);
- ckfree(nameUpper);
+ Tcl_Free(nameUpper);
return result;
}