summaryrefslogtreecommitdiffstats
path: root/generic/tclIORChan.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-26 07:29:02 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-26 07:29:02 (GMT)
commita4c35fb82f99d990ca1ef877cb9917c7f55151ff (patch)
treecdd02327448cf2c0393cbf3cea4fd48bb17e52c4 /generic/tclIORChan.c
parent81a213ed4ce77b15fbc6d5d97cc1235b689ad482 (diff)
parente12b1646c6f675cf09d5f1a72d4ecdffa5da7396 (diff)
downloadtcl-a4c35fb82f99d990ca1ef877cb9917c7f55151ff.zip
tcl-a4c35fb82f99d990ca1ef877cb9917c7f55151ff.tar.gz
tcl-a4c35fb82f99d990ca1ef877cb9917c7f55151ff.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tclIORChan.c')
-rw-r--r--generic/tclIORChan.c84
1 files changed, 42 insertions, 42 deletions
diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c
index 1b3aaa8..a9bab74 100644
--- a/generic/tclIORChan.c
+++ b/generic/tclIORChan.c
@@ -31,35 +31,35 @@
* Signatures of all functions used in the C layer of the reflection.
*/
-static int ReflectClose(ClientData clientData,
+static int ReflectClose(void *clientData,
Tcl_Interp *interp, int flags);
-static int ReflectInput(ClientData clientData, char *buf,
+static int ReflectInput(void *clientData, char *buf,
int toRead, int *errorCodePtr);
-static int ReflectOutput(ClientData clientData, const char *buf,
+static int ReflectOutput(void *clientData, const char *buf,
int toWrite, int *errorCodePtr);
-static void ReflectWatch(ClientData clientData, int mask);
-static int ReflectBlock(ClientData clientData, int mode);
+static void ReflectWatch(void *clientData, int mask);
+static int ReflectBlock(void *clientData, int mode);
#if TCL_THREADS
-static void ReflectThread(ClientData clientData, int action);
+static void ReflectThread(void *clientData, int action);
static int ReflectEventRun(Tcl_Event *ev, int flags);
-static int ReflectEventDelete(Tcl_Event *ev, ClientData cd);
+static int ReflectEventDelete(Tcl_Event *ev, void *cd);
#endif
-static long long ReflectSeekWide(ClientData clientData,
+static long long ReflectSeekWide(void *clientData,
long long offset, int mode, int *errorCodePtr);
#ifndef TCL_NO_DEPRECATED
-static int ReflectSeek(ClientData clientData, long offset,
+static int ReflectSeek(void *clientData, long offset,
int mode, int *errorCodePtr);
#endif
-static int ReflectGetOption(ClientData clientData,
+static int ReflectGetOption(void *clientData,
Tcl_Interp *interp, const char *optionName,
Tcl_DString *dsPtr);
-static int ReflectSetOption(ClientData clientData,
+static int ReflectSetOption(void *clientData,
Tcl_Interp *interp, const char *optionName,
const char *newValue);
-static int ReflectTruncate(ClientData clientData,
+static int ReflectTruncate(void *clientData,
long long length);
-static void TimerRunRead(ClientData clientData);
-static void TimerRunWrite(ClientData clientData);
+static void TimerRunRead(void *clientData);
+static void TimerRunWrite(void *clientData);
/*
* The C layer channel type/driver definition used by the reflection.
@@ -220,7 +220,7 @@ typedef enum {
#define IMPLIES(a,b) ((!(a)) || (b))
#define NEGIMPL(a,b)
-#define HAS(x,f) (x & FLAG(f))
+#define HAS(x,f) ((x) & FLAG(f))
#if TCL_THREADS
/*
@@ -408,7 +408,7 @@ TCL_DECLARE_MUTEX(rcForwardMutex)
static void ForwardOpToHandlerThread(ReflectedChannel *rcPtr,
ForwardedOperation op, const void *param);
static int ForwardProc(Tcl_Event *evPtr, int mask);
-static void SrcExitProc(ClientData clientData);
+static void SrcExitProc(void *clientData);
#define FreeReceivedError(p) \
if ((p)->base.mustFree) { \
@@ -507,7 +507,7 @@ static const char *msg_dstlost = "-code 1 -level 0 -errorcode NONE -errorinfo
int
TclChanCreateObjCmd(
- TCL_UNUSED(ClientData),
+ TCL_UNUSED(void *),
Tcl_Interp *interp,
int objc,
Tcl_Obj *const *objv)
@@ -616,7 +616,7 @@ TclChanCreateObjCmd(
* Compare open mode against optional r/w.
*/
- if (Tcl_ListObjGetElements(NULL, resObj, &listc, &listv) != TCL_OK) {
+ if (TclListObjGetElements(NULL, resObj, &listc, &listv) != TCL_OK) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"chan handler \"%s initialize\" returned non-list: %s",
TclGetString(cmdObj), TclGetString(resObj)));
@@ -809,7 +809,7 @@ ReflectEventRun(
static int
ReflectEventDelete(
Tcl_Event *ev,
- ClientData cd)
+ void *cd)
{
/* OWNER thread
*
@@ -829,7 +829,7 @@ ReflectEventDelete(
int
TclChanPostEventObjCmd(
- TCL_UNUSED(ClientData),
+ TCL_UNUSED(void *),
Tcl_Interp *interp,
int objc,
Tcl_Obj *const *objv)
@@ -1012,7 +1012,7 @@ TclChanPostEventObjCmd(
static void
TimerRunRead(
- ClientData clientData)
+ void *clientData)
{
ReflectedChannel *rcPtr = (ReflectedChannel *)clientData;
rcPtr->readTimer = NULL;
@@ -1021,7 +1021,7 @@ TimerRunRead(
static void
TimerRunWrite(
- ClientData clientData)
+ void *clientData)
{
ReflectedChannel *rcPtr = (ReflectedChannel *)clientData;
rcPtr->writeTimer = NULL;
@@ -1072,7 +1072,7 @@ UnmarshallErrorResult(
* information; if we panic here, something has gone badly wrong already.
*/
- if (Tcl_ListObjGetElements(interp, msgObj, &lc, &lv) != TCL_OK) {
+ if (TclListObjGetElements(interp, msgObj, &lc, &lv) != TCL_OK) {
Tcl_Panic("TclChanCaughtErrorBypass: Bad syntax of caught result");
}
if (interp == NULL) {
@@ -1169,7 +1169,7 @@ TclChanCaughtErrorBypass(
static int
ReflectClose(
- ClientData clientData,
+ void *clientData,
Tcl_Interp *interp,
int flags)
{
@@ -1329,7 +1329,7 @@ ReflectClose(
static int
ReflectInput(
- ClientData clientData,
+ void *clientData,
char *buf,
int toRead,
int *errorCodePtr)
@@ -1436,7 +1436,7 @@ ReflectInput(
static int
ReflectOutput(
- ClientData clientData,
+ void *clientData,
const char *buf,
int toWrite,
int *errorCodePtr)
@@ -1565,7 +1565,7 @@ ReflectOutput(
static long long
ReflectSeekWide(
- ClientData clientData,
+ void *clientData,
long long offset,
int seekMode,
int *errorCodePtr)
@@ -1642,7 +1642,7 @@ ReflectSeekWide(
#ifndef TCL_NO_DEPRECATED
static int
ReflectSeek(
- ClientData clientData,
+ void *clientData,
long offset,
int seekMode,
int *errorCodePtr)
@@ -1678,7 +1678,7 @@ ReflectSeek(
static void
ReflectWatch(
- ClientData clientData,
+ void *clientData,
int mask)
{
ReflectedChannel *rcPtr = (ReflectedChannel *)clientData;
@@ -1750,7 +1750,7 @@ ReflectWatch(
static int
ReflectBlock(
- ClientData clientData,
+ void *clientData,
int nonblocking)
{
ReflectedChannel *rcPtr = (ReflectedChannel *)clientData;
@@ -1817,7 +1817,7 @@ ReflectBlock(
static void
ReflectThread(
- ClientData clientData,
+ void *clientData,
int action)
{
ReflectedChannel *rcPtr = (ReflectedChannel *)clientData;
@@ -1854,7 +1854,7 @@ ReflectThread(
static int
ReflectSetOption(
- ClientData clientData, /* Channel to query */
+ void *clientData, /* Channel to query */
Tcl_Interp *interp, /* Interpreter to leave error messages in */
const char *optionName, /* Name of requested option */
const char *newValue) /* The new value */
@@ -1926,7 +1926,7 @@ ReflectSetOption(
static int
ReflectGetOption(
- ClientData clientData, /* Channel to query */
+ void *clientData, /* Channel to query */
Tcl_Interp *interp, /* Interpreter to leave error messages in */
const char *optionName, /* Name of reuqested option */
Tcl_DString *dsPtr) /* String to place the result into */
@@ -2020,7 +2020,7 @@ ReflectGetOption(
* result is a valid list. Nor that the list has an even number elements.
*/
- if (Tcl_ListObjGetElements(interp, resObj, &listc, &listv) != TCL_OK) {
+ if (TclListObjGetElements(interp, resObj, &listc, &listv) != TCL_OK) {
goto error;
}
@@ -2078,7 +2078,7 @@ ReflectGetOption(
static int
ReflectTruncate(
- ClientData clientData, /* Channel to query */
+ void *clientData, /* Channel to query */
long long length) /* Length to truncate to. */
{
ReflectedChannel *rcPtr = (ReflectedChannel *)clientData;
@@ -2111,7 +2111,7 @@ ReflectTruncate(
Tcl_Preserve(rcPtr);
- lenObj = Tcl_NewIntObj(length);
+ lenObj = Tcl_NewWideIntObj(length);
Tcl_IncrRefCount(lenObj);
if (InvokeTclMethod(rcPtr,METH_TRUNCATE,lenObj,NULL,&resObj)!=TCL_OK) {
@@ -2166,7 +2166,7 @@ EncodeEventMask(
int evIndex; /* Id of event for an element of the eventspec
* list. */
- if (Tcl_ListObjGetElements(interp, obj, &listc, &listv) != TCL_OK) {
+ if (TclListObjGetElements(interp, obj, &listc, &listv) != TCL_OK) {
return TCL_ERROR;
}
@@ -2644,7 +2644,7 @@ MarkDead(
static void
DeleteReflectedChannelMap(
- ClientData clientData, /* The per-interpreter data structure. */
+ void *clientData, /* The per-interpreter data structure. */
Tcl_Interp *interp) /* The interpreter being deleted. */
{
ReflectedChannelMap *rcmPtr = (ReflectedChannelMap *)clientData;
@@ -2823,7 +2823,7 @@ GetThreadReflectedChannelMap(void)
static void
DeleteThreadReflectedChannelMap(
- TCL_UNUSED(ClientData))
+ TCL_UNUSED(void *))
{
Tcl_HashSearch hSearch; /* Search variable. */
Tcl_HashEntry *hPtr; /* Search variable. */
@@ -3331,7 +3331,7 @@ ForwardProc(
int listc;
Tcl_Obj **listv;
- if (Tcl_ListObjGetElements(interp, resObj, &listc,
+ if (TclListObjGetElements(interp, resObj, &listc,
&listv) != TCL_OK) {
Tcl_DecrRefCount(resObj);
resObj = MarshallError(interp);
@@ -3361,7 +3361,7 @@ ForwardProc(
break;
case ForwardedTruncate: {
- Tcl_Obj *lenObj = Tcl_NewIntObj(paramPtr->truncate.length);
+ Tcl_Obj *lenObj = Tcl_NewWideIntObj(paramPtr->truncate.length);
Tcl_IncrRefCount(lenObj);
Tcl_Preserve(rcPtr);
@@ -3409,7 +3409,7 @@ ForwardProc(
static void
SrcExitProc(
- ClientData clientData)
+ void *clientData)
{
ForwardingEvent *evPtr = (ForwardingEvent *)clientData;
ForwardingResult *resultPtr;