Complete deprecation of Tcl_SetTimeProc/Tcl_QueryTimeProc
This commit is contained in:
+3
-3
@@ -47,9 +47,9 @@ The unit is micro-seconds.
|
||||
Only time differences are defined.
|
||||
The timer value 0 may be the epoc but may also be the start-up of the system.
|
||||
.PP
|
||||
The value is contigous but may jump due to timer virtualization or sleep mode.
|
||||
The value is contiguous but may jump due to timer virtualization or sleep mode.
|
||||
.PP
|
||||
The precision is system dependent and not guranteed to be micro-second precise.
|
||||
The precision is system dependent and not guaranteed to be micro-second precise.
|
||||
.PP
|
||||
The \fBTcl_GetTime\fR function retrieves the current time as a
|
||||
\fITcl_Time\fR structure in memory the caller provides. This
|
||||
@@ -72,7 +72,7 @@ The \fIusec\fR member of the structure is filled in with the number of
|
||||
microseconds that have elapsed since the start of the second
|
||||
designated by \fIsec\fR.
|
||||
.PP
|
||||
This command uses the system wall clock and is not contigous by definition.
|
||||
This command uses the system wall clock and is not contiguous by definition.
|
||||
It may have large jumps in short time, specially if the system is awaked from
|
||||
sleep mode.
|
||||
.SS "VIRTUALIZED TIME"
|
||||
|
||||
+2
-2
@@ -1781,12 +1781,12 @@ declare 551 {
|
||||
}
|
||||
|
||||
# TIP#233 (virtualized time) akupries
|
||||
declare 552 {
|
||||
declare 552 {deprecated {No longer supported}} {
|
||||
void Tcl_SetTimeProc(Tcl_GetTimeProc *getProc,
|
||||
Tcl_ScaleTimeProc *scaleProc,
|
||||
void *clientData)
|
||||
}
|
||||
declare 553 {
|
||||
declare 553 {deprecated {No longer supported}} {
|
||||
void Tcl_QueryTimeProc(Tcl_GetTimeProc **getProc,
|
||||
Tcl_ScaleTimeProc **scaleProc,
|
||||
void **clientData)
|
||||
|
||||
+3
-1
@@ -1293,11 +1293,13 @@ typedef int (Tcl_WaitForEventProc) (const Tcl_Time *timePtr);
|
||||
|
||||
/*
|
||||
* TIP #233 (Virtualized Time)
|
||||
* WARNING: functionality removed, calls TCL_Panic
|
||||
* WARNING: functionality removed, calls Tcl_Panic
|
||||
*/
|
||||
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
typedef void (Tcl_GetTimeProc) (Tcl_Time *timebuf, void *clientData);
|
||||
typedef void (Tcl_ScaleTimeProc) (Tcl_Time *timebuf, void *clientData);
|
||||
#endif /* TCL_NO_DEPRECATED */
|
||||
|
||||
/*
|
||||
* TIP #723 (Monotonic Time)
|
||||
|
||||
+14
-4
@@ -37,6 +37,8 @@
|
||||
# define Tcl_ObjCmdProc void
|
||||
# define Tcl_CmdTraceProc void
|
||||
# define Tcl_CmdObjTraceProc void
|
||||
# define Tcl_GetTimeProc void
|
||||
# define Tcl_ScaleTimeProc void
|
||||
#endif /* TCL_NO_DEPRECATED */
|
||||
|
||||
/*
|
||||
@@ -1471,11 +1473,13 @@ EXTERN int Tcl_GetEnsembleNamespace(Tcl_Interp *interp,
|
||||
Tcl_Command token,
|
||||
Tcl_Namespace **namespacePtrPtr);
|
||||
/* 552 */
|
||||
EXTERN void Tcl_SetTimeProc(Tcl_GetTimeProc *getProc,
|
||||
TCL_DEPRECATED("No longer supported")
|
||||
void Tcl_SetTimeProc(Tcl_GetTimeProc *getProc,
|
||||
Tcl_ScaleTimeProc *scaleProc,
|
||||
void *clientData);
|
||||
/* 553 */
|
||||
EXTERN void Tcl_QueryTimeProc(Tcl_GetTimeProc **getProc,
|
||||
TCL_DEPRECATED("No longer supported")
|
||||
void Tcl_QueryTimeProc(Tcl_GetTimeProc **getProc,
|
||||
Tcl_ScaleTimeProc **scaleProc,
|
||||
void **clientData);
|
||||
/* 554 */
|
||||
@@ -2486,8 +2490,8 @@ typedef struct TclStubs {
|
||||
int (*tcl_GetEnsembleUnknownHandler) (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj **unknownListPtr); /* 549 */
|
||||
int (*tcl_GetEnsembleFlags) (Tcl_Interp *interp, Tcl_Command token, int *flagsPtr); /* 550 */
|
||||
int (*tcl_GetEnsembleNamespace) (Tcl_Interp *interp, Tcl_Command token, Tcl_Namespace **namespacePtrPtr); /* 551 */
|
||||
void (*tcl_SetTimeProc) (Tcl_GetTimeProc *getProc, Tcl_ScaleTimeProc *scaleProc, void *clientData); /* 552 */
|
||||
void (*tcl_QueryTimeProc) (Tcl_GetTimeProc **getProc, Tcl_ScaleTimeProc **scaleProc, void **clientData); /* 553 */
|
||||
TCL_DEPRECATED_API("No longer supported") void (*tcl_SetTimeProc) (Tcl_GetTimeProc *getProc, Tcl_ScaleTimeProc *scaleProc, void *clientData); /* 552 */
|
||||
TCL_DEPRECATED_API("No longer supported") void (*tcl_QueryTimeProc) (Tcl_GetTimeProc **getProc, Tcl_ScaleTimeProc **scaleProc, void **clientData); /* 553 */
|
||||
Tcl_DriverThreadActionProc * (*tcl_ChannelThreadActionProc) (const Tcl_ChannelType *chanTypePtr); /* 554 */
|
||||
Tcl_Obj * (*tcl_NewBignumObj) (void *value); /* 555 */
|
||||
Tcl_Obj * (*tcl_DbNewBignumObj) (void *value, const char *file, int line); /* 556 */
|
||||
@@ -4380,5 +4384,11 @@ extern const TclStubs *tclStubsPtr;
|
||||
#if TCL_MINOR_VERSION < 1
|
||||
# undef Tcl_IsEmpty
|
||||
#endif
|
||||
#ifdef TCL_NO_DEPRECATED
|
||||
# undef Tcl_QueryTimeProc
|
||||
# undef Tcl_ScaleTimeProc
|
||||
# undef Tcl_SetTimeProc
|
||||
# undef Tcl_GetTimeProc
|
||||
#endif /* TCL_NO_DEPRECATED */
|
||||
|
||||
#endif /* _TCLDECLS */
|
||||
|
||||
@@ -75,6 +75,8 @@
|
||||
# define Tcl_NRCallObjProc 0
|
||||
# define Tcl_NRCreateCommand 0
|
||||
# define TclGetObjInterpProc 0
|
||||
# define Tcl_QueryTimeProc 0
|
||||
# define Tcl_SetTimeProc 0
|
||||
#endif
|
||||
|
||||
#define TclUtfCharComplete Tcl_UtfCharComplete
|
||||
|
||||
+18
-18
@@ -2206,13 +2206,13 @@ static int UtfExtWrapper(
|
||||
|
||||
/* Set up output buffer */
|
||||
bufLen = dstLen + 4; /* 4 -> overflow detection */
|
||||
dstBufPtr = (char *) Tcl_Alloc(bufLen);
|
||||
dstBufPtr = (char *)Tcl_Alloc(bufLen);
|
||||
memset(dstBufPtr, 0xFF, dstLen); /* Need to check nul terminator */
|
||||
memmove(dstBufPtr + dstLen, "\xAB\xCD\xEF\xAB", 4); /* overflow detection */
|
||||
|
||||
/* Set up input buffer, including prefix if one has been specified */
|
||||
bytes = Tcl_GetByteArrayFromObj(objv[3], &srcLen);
|
||||
srcBufPtr = (char *) Tcl_Alloc(prefixLen+srcLen+1); /* +1 to ensure not 0 */
|
||||
srcBufPtr = (char *)Tcl_Alloc(prefixLen+srcLen+1); /* +1 to ensure not 0 */
|
||||
if (prefixLen != 0) {
|
||||
const unsigned char *prefixBytes;
|
||||
Tcl_Size nbytes;
|
||||
@@ -9177,7 +9177,7 @@ vamoose:
|
||||
*/
|
||||
static int
|
||||
TestChanBlockMode(
|
||||
TCL_UNUSED(ClientData), /* instanceData */
|
||||
TCL_UNUSED(void *), /* instanceData */
|
||||
TCL_UNUSED(int)) /* mode */
|
||||
{
|
||||
return 0;
|
||||
@@ -9185,7 +9185,7 @@ TestChanBlockMode(
|
||||
|
||||
static void
|
||||
TestChanSourceWatch(
|
||||
TCL_UNUSED(ClientData), /* instanceData */
|
||||
TCL_UNUSED(void *), /* instanceData */
|
||||
int mask)
|
||||
{
|
||||
if (mask)
|
||||
@@ -9194,7 +9194,7 @@ TestChanSourceWatch(
|
||||
|
||||
static void
|
||||
TestChanSinkWatch(
|
||||
TCL_UNUSED(ClientData), /* instanceData */
|
||||
TCL_UNUSED(void *), /* instanceData */
|
||||
int mask)
|
||||
{
|
||||
if (mask)
|
||||
@@ -9203,14 +9203,14 @@ TestChanSinkWatch(
|
||||
|
||||
typedef struct TestChanSourceState {
|
||||
Tcl_Size numSourced; /* How many bytes returned so far */
|
||||
int len; /* Length of data[] */
|
||||
unsigned char data[1];
|
||||
size_t len; /* Length of data[] */
|
||||
unsigned char data[TCLFLEXARRAY];
|
||||
|
||||
} TestChanSourceState;
|
||||
|
||||
static int
|
||||
TestChanSourceInput(
|
||||
ClientData instanceData,
|
||||
void *instanceData,
|
||||
char *outPtr, /* Where to store data. Assumed aligned */
|
||||
const int maxReadCount, /* Maximum number of bytes to read. */
|
||||
TCL_UNUSED(int *)) /* errorCodePtr - Where to store error codes. */
|
||||
@@ -9261,7 +9261,7 @@ TestChanSourceInput(
|
||||
|
||||
unsigned int *to = (unsigned int *)outPtr;
|
||||
unsigned int *end = to + (maxReadCount / sizeof(unsigned int));
|
||||
int nremain = maxReadCount - (sizeof(unsigned int) * (end - to));
|
||||
size_t nremain = maxReadCount - (sizeof(unsigned int) * (end - to));
|
||||
while (to < end)
|
||||
*to++ = u.val;
|
||||
assert(nremain < chanPtr->len);
|
||||
@@ -9282,7 +9282,7 @@ TestChanSourceInput(
|
||||
}
|
||||
int nchunks = (maxReadCount-ncopied)/chanPtr->len;
|
||||
char *end = to + (nchunks * chanPtr->len);
|
||||
int nremain = (maxReadCount-ncopied) - (end - to);
|
||||
size_t nremain = (maxReadCount-ncopied) - (end - to);
|
||||
/* Copy the data in chunks */
|
||||
while (to < end) {
|
||||
memmove(to, chanPtr->data, chanPtr->len);
|
||||
@@ -9300,7 +9300,7 @@ TestChanSourceInput(
|
||||
|
||||
static int
|
||||
TestChanSourceClose2 (
|
||||
ClientData instanceData,
|
||||
void *instanceData,
|
||||
TCL_UNUSED(Tcl_Interp *), /* interp */
|
||||
int flags)
|
||||
{
|
||||
@@ -9311,7 +9311,7 @@ TestChanSourceClose2 (
|
||||
|
||||
static int
|
||||
TestChanSinkOutput (
|
||||
TCL_UNUSED(ClientData), /* Instance data */
|
||||
TCL_UNUSED(void *), /* Instance data */
|
||||
TCL_UNUSED(const char *), /* Bytes to write */
|
||||
int nbytes,
|
||||
TCL_UNUSED(int *)) /* errorCodePtr */
|
||||
@@ -9321,14 +9321,14 @@ TestChanSinkOutput (
|
||||
|
||||
static int
|
||||
TestChanSinkClose2 (
|
||||
TCL_UNUSED(ClientData), /* Instance data */
|
||||
TCL_UNUSED(void *), /* Instance data */
|
||||
TCL_UNUSED(Tcl_Interp *), /* interp */
|
||||
TCL_UNUSED(int)) /* flags */
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Tcl_ChannelType TestChanSourceDispatch = {
|
||||
static const Tcl_ChannelType TestChanSourceDispatch = {
|
||||
"testchansource", /* Channel type name */
|
||||
(Tcl_ChannelTypeVersion)TCL_CHANNEL_VERSION_5,
|
||||
NULL,
|
||||
@@ -9348,7 +9348,7 @@ Tcl_ChannelType TestChanSourceDispatch = {
|
||||
NULL /* Truncate */
|
||||
};
|
||||
|
||||
Tcl_ChannelType TestChanSinkDispatch = {
|
||||
static const Tcl_ChannelType TestChanSinkDispatch = {
|
||||
"testchansink", /* Channel type name */
|
||||
(Tcl_ChannelTypeVersion)TCL_CHANNEL_VERSION_5,
|
||||
NULL,
|
||||
@@ -9405,7 +9405,7 @@ TestChanCreateCmd(
|
||||
int ret;
|
||||
int flags = 0;
|
||||
void *instancePtr = NULL;
|
||||
Tcl_ChannelType *dispatchPtr = NULL;
|
||||
const Tcl_ChannelType *dispatchPtr = NULL;
|
||||
const unsigned char *bytes = NULL;
|
||||
|
||||
if (objc < 2) {
|
||||
@@ -9445,8 +9445,8 @@ TestChanCreateCmd(
|
||||
bytes = (const unsigned char *)"\0";
|
||||
}
|
||||
TestChanSourceState *sourceStatePtr;
|
||||
sourceStatePtr = (TestChanSourceState *) Tcl_Alloc(
|
||||
sizeof(TestChanSourceState) + len - sizeof(sourceStatePtr->data));
|
||||
sourceStatePtr = (TestChanSourceState *)Tcl_Alloc(
|
||||
offsetof(TestChanSourceState, data) + len);
|
||||
sourceStatePtr->numSourced = 0;
|
||||
sourceStatePtr->len = len;
|
||||
memmove(sourceStatePtr->data, bytes, len);
|
||||
|
||||
@@ -2417,6 +2417,7 @@ TimerInfoDo(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
void
|
||||
Tcl_SetTimeProc(
|
||||
TCL_UNUSED(Tcl_GetTimeProc *),
|
||||
@@ -2425,6 +2426,7 @@ Tcl_SetTimeProc(
|
||||
{
|
||||
Tcl_Panic("Tcl_SetTimeProc is not supported in TCL 9.1");
|
||||
}
|
||||
#endif /* TCL_NO_DEPRECATED */
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
@@ -2443,6 +2445,7 @@ Tcl_SetTimeProc(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
void
|
||||
Tcl_QueryTimeProc(
|
||||
TCL_UNUSED(Tcl_GetTimeProc **),
|
||||
@@ -2451,6 +2454,7 @@ Tcl_QueryTimeProc(
|
||||
{
|
||||
Tcl_Panic("Tcl_QueryTimeProc is not supported in TCL 9.1");
|
||||
}
|
||||
#endif /* TCL_NO_DEPRECATED */
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
|
||||
Reference in New Issue
Block a user