summaryrefslogtreecommitdiffstats
path: root/unix/tclKqueueNotfy.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-10-08 19:00:39 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-10-08 19:00:39 (GMT)
commit1812305cb35d0096d50f9b1e7c1c368f230b6f07 (patch)
tree29a9a607c030b3cfa6c0ae744822eb76de21ee86 /unix/tclKqueueNotfy.c
parentfe34611d8ec24bd6dd816cf00fa8ac15355bde79 (diff)
parent99e9ce3656f195c60ba4e928559c05d47167901c (diff)
downloadtcl-1812305cb35d0096d50f9b1e7c1c368f230b6f07.zip
tcl-1812305cb35d0096d50f9b1e7c1c368f230b6f07.tar.gz
tcl-1812305cb35d0096d50f9b1e7c1c368f230b6f07.tar.bz2
TIP #494 implementation: More use of size_t in Tcl 9
Diffstat (limited to 'unix/tclKqueueNotfy.c')
-rw-r--r--unix/tclKqueueNotfy.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/unix/tclKqueueNotfy.c b/unix/tclKqueueNotfy.c
index 6d685ad..bea1b30 100644
--- a/unix/tclKqueueNotfy.c
+++ b/unix/tclKqueueNotfy.c
@@ -214,7 +214,7 @@ PlatformEventsControl(
struct stat fdStat;
if (isNew) {
- newPedPtr = ckalloc(sizeof(*newPedPtr));
+ newPedPtr = Tcl_Alloc(sizeof(*newPedPtr));
newPedPtr->filePtr = filePtr;
newPedPtr->tsdPtr = tsdPtr;
filePtr->pedPtr = newPedPtr;
@@ -332,7 +332,7 @@ PlatformEventsFinalize(
tsdPtr->eventsFd = 0;
}
if (tsdPtr->readyEvents) {
- ckfree(tsdPtr->readyEvents);
+ Tcl_Free(tsdPtr->readyEvents);
tsdPtr->maxReadyEvents = 0;
}
pthread_mutex_unlock(&tsdPtr->notifierMutex);
@@ -398,13 +398,13 @@ PlatformEventsInit(
} else if (fcntl(tsdPtr->eventsFd, F_SETFD, FD_CLOEXEC) == -1) {
Tcl_Panic("fcntl: %s", strerror(errno));
}
- filePtr = ckalloc(sizeof(*filePtr));
+ filePtr = Tcl_Alloc(sizeof(*filePtr));
filePtr->fd = tsdPtr->triggerPipe[0];
filePtr->mask = TCL_READABLE;
PlatformEventsControl(filePtr, tsdPtr, EV_ADD, 1);
if (!tsdPtr->readyEvents) {
tsdPtr->maxReadyEvents = 512;
- tsdPtr->readyEvents = ckalloc(tsdPtr->maxReadyEvents
+ tsdPtr->readyEvents = Tcl_Alloc(tsdPtr->maxReadyEvents
* sizeof(tsdPtr->readyEvents[0]));
}
LIST_INIT(&tsdPtr->firstReadyFileHandlerPtr);
@@ -568,7 +568,7 @@ Tcl_CreateFileHandler(
}
}
if (filePtr == NULL) {
- filePtr = ckalloc(sizeof(FileHandler));
+ filePtr = Tcl_Alloc(sizeof(FileHandler));
filePtr->fd = fd;
filePtr->readyMask = 0;
filePtr->nextPtr = tsdPtr->firstFileHandlerPtr;
@@ -637,7 +637,7 @@ Tcl_DeleteFileHandler(
PlatformEventsControl(filePtr, tsdPtr, EV_DELETE, 0);
if (filePtr->pedPtr) {
- ckfree(filePtr->pedPtr);
+ Tcl_Free(filePtr->pedPtr);
}
/*
@@ -649,7 +649,7 @@ Tcl_DeleteFileHandler(
} else {
prevPtr->nextPtr = filePtr->nextPtr;
}
- ckfree(filePtr);
+ Tcl_Free(filePtr);
}
}
@@ -754,7 +754,7 @@ Tcl_WaitForEvent(
if (filePtr->readyMask == 0) {
FileHandlerEvent *fileEvPtr =
- ckalloc(sizeof(FileHandlerEvent));
+ Tcl_Alloc(sizeof(FileHandlerEvent));
fileEvPtr->header.proc = FileHandlerEventProc;
fileEvPtr->fd = filePtr->fd;
@@ -817,7 +817,7 @@ Tcl_WaitForEvent(
if (filePtr->readyMask == 0) {
FileHandlerEvent *fileEvPtr =
- ckalloc(sizeof(FileHandlerEvent));
+ Tcl_Alloc(sizeof(FileHandlerEvent));
fileEvPtr->header.proc = FileHandlerEventProc;
fileEvPtr->fd = filePtr->fd;