summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-05-19 16:47:58 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-05-19 16:47:58 (GMT)
commit16a75f3cbf8ba7ab30d4f5f1adcd658269d9ae8c (patch)
tree05034cc48612753645a36939be59d920c22055b8 /generic/tclUtil.c
parent6fa73194d556765f6a8dfe33c0f609377d5fb41c (diff)
downloadtcl-16a75f3cbf8ba7ab30d4f5f1adcd658269d9ae8c.zip
tcl-16a75f3cbf8ba7ab30d4f5f1adcd658269d9ae8c.tar.gz
tcl-16a75f3cbf8ba7ab30d4f5f1adcd658269d9ae8c.tar.bz2
More refactoring into common code
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index e8cd164..046ba00 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -2615,7 +2615,7 @@ Tcl_DStringAppend(
if (newSize > dsPtr->spaceAvl) {
if (dsPtr->string == dsPtr->staticSpace) {
char *newString;
- newString = (char *) TclOverAlloc(newSize, &dsPtr->spaceAvl);
+ newString = (char *) TclAllocEx(newSize, &dsPtr->spaceAvl);
memcpy(newString, dsPtr->string, dsPtr->length);
dsPtr->string = newString;
} else {
@@ -2627,8 +2627,8 @@ Tcl_DStringAppend(
/* Source string is within this DString. Note offset */
offset = bytes - dsPtr->string;
}
- dsPtr->string = (char *) TclOverRealloc(
- newSize, dsPtr->string, dsPtr->spaceAvl, &dsPtr->spaceAvl);
+ dsPtr->string =
+ (char *)TclReallocEx(dsPtr->string, newSize, &dsPtr->spaceAvl);
if (offset >= 0) {
bytes = dsPtr->string + offset;
}
@@ -2746,7 +2746,7 @@ Tcl_DStringAppendElement(
if (newSize > dsPtr->spaceAvl) {
if (dsPtr->string == dsPtr->staticSpace) {
char *newString;
- newString = (char *) TclOverAlloc(newSize, &dsPtr->spaceAvl);
+ newString = (char *) TclAllocEx(newSize, &dsPtr->spaceAvl);
memcpy(newString, dsPtr->string, dsPtr->length);
dsPtr->string = newString;
} else {
@@ -2758,8 +2758,8 @@ Tcl_DStringAppendElement(
/* Source string is within this DString. Note offset */
offset = element - dsPtr->string;
}
- dsPtr->string = (char *) TclOverRealloc(
- newSize, dsPtr->string, dsPtr->spaceAvl, &dsPtr->spaceAvl);
+ dsPtr->string =
+ (char *)TclReallocEx(dsPtr->string, newSize, &dsPtr->spaceAvl);
if (offset >= 0) {
element = dsPtr->string + offset;
}