diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-10-08 19:00:39 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-10-08 19:00:39 (GMT) |
| commit | 1812305cb35d0096d50f9b1e7c1c368f230b6f07 (patch) | |
| tree | 29a9a607c030b3cfa6c0ae744822eb76de21ee86 /macosx | |
| parent | fe34611d8ec24bd6dd816cf00fa8ac15355bde79 (diff) | |
| parent | 99e9ce3656f195c60ba4e928559c05d47167901c (diff) | |
| download | tcl-1812305cb35d0096d50f9b1e7c1c368f230b6f07.zip tcl-1812305cb35d0096d50f9b1e7c1c368f230b6f07.tar.gz tcl-1812305cb35d0096d50f9b1e7c1c368f230b6f07.tar.bz2 | |
TIP #494 implementation: More use of size_t in Tcl 9
Diffstat (limited to 'macosx')
| -rw-r--r-- | macosx/tclMacOSXBundle.c | 4 | ||||
| -rw-r--r-- | macosx/tclMacOSXFCmd.c | 4 | ||||
| -rw-r--r-- | macosx/tclMacOSXNotify.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/macosx/tclMacOSXBundle.c b/macosx/tclMacOSXBundle.c index dad3733..eeaf7b9 100644 --- a/macosx/tclMacOSXBundle.c +++ b/macosx/tclMacOSXBundle.c @@ -167,7 +167,7 @@ Tcl_MacOSXOpenBundleResources( Tcl_Interp *interp, const char *bundleName, int hasResourceFile, - int maxPathLen, + size_t maxPathLen, char *libraryPath) { return Tcl_MacOSXOpenVersionedBundleResources(interp, bundleName, NULL, @@ -201,7 +201,7 @@ Tcl_MacOSXOpenVersionedBundleResources( const char *bundleName, const char *bundleVersion, int hasResourceFile, - int maxPathLen, + size_t maxPathLen, char *libraryPath) { #ifdef HAVE_COREFOUNDATION diff --git a/macosx/tclMacOSXFCmd.c b/macosx/tclMacOSXFCmd.c index 3adc808..f33cdf4 100644 --- a/macosx/tclMacOSXFCmd.c +++ b/macosx/tclMacOSXFCmd.c @@ -654,7 +654,7 @@ SetOSTypeFromAny( OSType osType; char bytes[4] = {'\0','\0','\0','\0'}; - memcpy(bytes, Tcl_DStringValue(&ds), (size_t)Tcl_DStringLength(&ds)); + memcpy(bytes, Tcl_DStringValue(&ds), Tcl_DStringLength(&ds)); osType = (OSType) bytes[0] << 24 | (OSType) bytes[1] << 16 | (OSType) bytes[2] << 8 | @@ -705,7 +705,7 @@ UpdateStringOfOSType( string[4] = '\0'; Tcl_ExternalToUtfDString(encoding, string, -1, &ds); len = (unsigned) Tcl_DStringLength(&ds) + 1; - objPtr->bytes = ckalloc(len); + objPtr->bytes = Tcl_Alloc(len); memcpy(objPtr->bytes, Tcl_DStringValue(&ds), len); objPtr->length = Tcl_DStringLength(&ds); Tcl_DStringFree(&ds); diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c index 1af73de..cf78aba 100644 --- a/macosx/tclMacOSXNotify.c +++ b/macosx/tclMacOSXNotify.c @@ -966,7 +966,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; @@ -1094,7 +1094,7 @@ Tcl_DeleteFileHandler( } else { prevPtr->nextPtr = filePtr->nextPtr; } - ckfree(filePtr); + Tcl_Free(filePtr); } /* @@ -1349,7 +1349,7 @@ QueueFileEvents( */ if (filePtr->readyMask == 0) { - FileHandlerEvent *fileEvPtr = ckalloc(sizeof(FileHandlerEvent)); + FileHandlerEvent *fileEvPtr = Tcl_Alloc(sizeof(FileHandlerEvent)); fileEvPtr->header.proc = FileHandlerEventProc; fileEvPtr->fd = filePtr->fd; |
