summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-11-20 20:07:43 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-11-20 20:07:43 (GMT)
commite043c623f79de150a3f1230d95d4d66d6d9da62c (patch)
tree4412d9a45167b471a9b3efb92230e9d46d6321f8 /generic
parenteec237466690316958a6a7686e5ba5030992a358 (diff)
downloadtcl-e043c623f79de150a3f1230d95d4d66d6d9da62c.zip
tcl-e043c623f79de150a3f1230d95d4d66d6d9da62c.tar.gz
tcl-e043c623f79de150a3f1230d95d4d66d6d9da62c.tar.bz2
Fix TclpGetPid() signature (should use Tcl_Size, not size_t)
Diffstat (limited to 'generic')
-rw-r--r--generic/tclInt.decls4
-rw-r--r--generic/tclIntPlatDecls.h8
-rw-r--r--generic/tclPipe.c2
-rw-r--r--generic/tclProcess.c10
-rw-r--r--generic/tclStubInit.c6
5 files changed, 15 insertions, 15 deletions
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 36c6159..7c8ea15 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -759,7 +759,7 @@ declare 7 {
TclFile TclpOpenFile(const char *fname, int mode)
}
declare 8 {
- size_t TclpGetPid(Tcl_Pid pid)
+ Tcl_Size TclpGetPid(Tcl_Pid pid)
}
declare 9 {
TclFile TclpCreateTempFile(const char *contents)
@@ -780,7 +780,7 @@ declare 17 {
const Tcl_StatBuf *statBufPtr, int dontCopyAtts)
}
declare 20 {
- void TclWinAddProcess(void *hProcess, size_t id)
+ void TclWinAddProcess(void *hProcess, Tcl_Size id)
}
declare 24 {
char *TclWinNoBackslash(char *path)
diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h
index c935302..eb27932 100644
--- a/generic/tclIntPlatDecls.h
+++ b/generic/tclIntPlatDecls.h
@@ -587,7 +587,7 @@ EXTERN TclFile TclpMakeFile(Tcl_Channel channel, int direction);
/* 7 */
EXTERN TclFile TclpOpenFile(const char *fname, int mode);
/* 8 */
-EXTERN size_t TclpGetPid(Tcl_Pid pid);
+EXTERN Tcl_Size TclpGetPid(Tcl_Pid pid);
/* 9 */
EXTERN TclFile TclpCreateTempFile(const char *contents);
/* Slot 10 is reserved */
@@ -611,7 +611,7 @@ EXTERN int TclUnixCopyFile(const char *src, const char *dst,
/* Slot 18 is reserved */
/* Slot 19 is reserved */
/* 20 */
-EXTERN void TclWinAddProcess(void *hProcess, size_t id);
+EXTERN void TclWinAddProcess(void *hProcess, Tcl_Size id);
/* Slot 21 is reserved */
/* Slot 22 is reserved */
/* Slot 23 is reserved */
@@ -641,7 +641,7 @@ typedef struct TclIntPlatStubs {
int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 5 */
TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */
TclFile (*tclpOpenFile) (const char *fname, int mode); /* 7 */
- size_t (*tclpGetPid) (Tcl_Pid pid); /* 8 */
+ Tcl_Size (*tclpGetPid) (Tcl_Pid pid); /* 8 */
TclFile (*tclpCreateTempFile) (const char *contents); /* 9 */
void (*reserved10)(void);
void (*tclGetAndDetachPids) (Tcl_Interp *interp, Tcl_Channel chan); /* 11 */
@@ -653,7 +653,7 @@ typedef struct TclIntPlatStubs {
int (*tclUnixCopyFile) (const char *src, const char *dst, const Tcl_StatBuf *statBufPtr, int dontCopyAtts); /* 17 */
void (*reserved18)(void);
void (*reserved19)(void);
- void (*tclWinAddProcess) (void *hProcess, size_t id); /* 20 */
+ void (*tclWinAddProcess) (void *hProcess, Tcl_Size id); /* 20 */
void (*reserved21)(void);
void (*reserved22)(void);
void (*reserved23)(void);
diff --git a/generic/tclPipe.c b/generic/tclPipe.c
index 7e51d57..854ecd5 100644
--- a/generic/tclPipe.c
+++ b/generic/tclPipe.c
@@ -975,7 +975,7 @@ TclCreatePipeline(
}
if (pidPtr != NULL) {
for (i = 0; i < numPids; i++) {
- if (pidPtr[i] != (Tcl_Pid) -1) {
+ if (pidPtr[i] != (Tcl_Pid)-1) {
Tcl_DetachPids(1, &pidPtr[i]);
}
}
diff --git a/generic/tclProcess.c b/generic/tclProcess.c
index b621e31..b16c73d 100644
--- a/generic/tclProcess.c
+++ b/generic/tclProcess.c
@@ -44,10 +44,10 @@ TCL_DECLARE_MUTEX(infoTablesMutex)
*/
static void InitProcessInfo(ProcessInfo *info, Tcl_Pid pid,
- int resolvedPid);
+ Tcl_Size resolvedPid);
static void FreeProcessInfo(ProcessInfo *info);
static int RefreshProcessInfo(ProcessInfo *info, int options);
-static TclProcessWaitStatus WaitProcessStatus(Tcl_Pid pid, size_t resolvedPid,
+static TclProcessWaitStatus WaitProcessStatus(Tcl_Pid pid, Tcl_Size resolvedPid,
int options, int *codePtr, Tcl_Obj **msgPtr,
Tcl_Obj **errorObjPtr);
static Tcl_Obj * BuildProcessStatusObj(ProcessInfo *info);
@@ -76,7 +76,7 @@ void
InitProcessInfo(
ProcessInfo *info, /* Structure to initialize. */
Tcl_Pid pid, /* Process id. */
- int resolvedPid) /* Resolved process id. */
+ Tcl_Size resolvedPid) /* Resolved process id. */
{
info->pid = pid;
info->resolvedPid = resolvedPid;
@@ -185,7 +185,7 @@ RefreshProcessInfo(
TclProcessWaitStatus
WaitProcessStatus(
Tcl_Pid pid, /* Process id. */
- size_t resolvedPid, /* Resolved process id. */
+ Tcl_Size resolvedPid, /* Resolved process id. */
int options, /* Options passed to Tcl_WaitPid. */
int *codePtr, /* If non-NULL, will receive either:
* - 0 for normal exit.
@@ -789,7 +789,7 @@ void
TclProcessCreated(
Tcl_Pid pid) /* Process id. */
{
- size_t resolvedPid;
+ Tcl_Size resolvedPid;
Tcl_HashEntry *entry, *entry2;
int isNew;
ProcessInfo *info;
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 754023c..6ee2c7a 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -294,7 +294,7 @@ doNothing(void)
{
/* dummy implementation, no need to do anything */
}
-# define TclWinAddProcess (void (*) (void *, size_t)) doNothing
+# define TclWinAddProcess (void (*) (void *, Tcl_Size)) doNothing
# define TclWinFlushDirtyChannels doNothing
#define TclWinNoBackslash winNoBackslash
@@ -319,10 +319,10 @@ void *TclWinGetTclInstance()
return hInstance;
}
-size_t
+Tcl_Size
TclpGetPid(Tcl_Pid pid)
{
- return (size_t)pid;
+ return (Tcl_Size)PTR2INT(pid);
}
#if defined(TCL_WIDE_INT_IS_LONG)