summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornijtmans <nijtmans>2008-07-24 21:54:38 (GMT)
committernijtmans <nijtmans>2008-07-24 21:54:38 (GMT)
commit7f55ab2959b7ec3cac71c72171f20aed26c8f016 (patch)
treed6af35eba3a72d32359fa5a28abd6fe83823567d
parent7b1a1c06d6d6cdf4035ef5b35802f85862b27088 (diff)
downloadtcl-7f55ab2959b7ec3cac71c72171f20aed26c8f016.zip
tcl-7f55ab2959b7ec3cac71c72171f20aed26c8f016.tar.gz
tcl-7f55ab2959b7ec3cac71c72171f20aed26c8f016.tar.bz2
CONSTified 4 functions in the Notifier which all have a Tcl_Time* in it which is
supposed to be a constant, but this was not reflected in the API: Tcl_SetTimer Tcl_WaitForEvent Tcl_ConditionWait Tcl_SetMaxBlockTime Introduced a CONST86, so extensions which have their own Notifier (are there any?) can be modified to compile against both Tcl 8.5 and Tcl 8.6. This change complies with TIP #24
-rw-r--r--ChangeLog19
-rw-r--r--doc/Notifier.34
-rw-r--r--doc/Thread.34
-rw-r--r--generic/tcl.decls10
-rw-r--r--generic/tcl.h14
-rw-r--r--generic/tclDecls.h19
-rw-r--r--generic/tclNotify.c4
-rw-r--r--generic/tclThread.c8
-rw-r--r--macosx/tclMacOSXNotify.c6
-rw-r--r--unix/tclUnixNotfy.c6
-rw-r--r--unix/tclUnixThrd.c14
-rw-r--r--win/tclWinNotify.c6
-rw-r--r--win/tclWinThrd.c10
13 files changed, 73 insertions, 51 deletions
diff --git a/ChangeLog b/ChangeLog
index 449a1fa..77604ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2007-02-24 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * doc/Notifier.3 CONSTified 4 functions in the
+ * doc/Thread.3 Notifier which all have a
+ * generic/tcl.decls Tcl_Time * in it which is supposed
+ * generic/tcl.h to be a constant, but this was not
+ * generic/tclDecls.h reflected in the API:
+ * generic/tclNotify.c Tcl_SetTimer
+ * generic/tclThread.c Tcl_WaitForEvent
+ * macosx/tclMacOSXNotify.c Tcl_ConditionWait
+ * unix/tclUnixNotfy.c Tcl_SetMaxBlockTime
+ * unix/tclUnixThrd.c Introduced a CONST86, so extensions which
+ * win/tclWinNotify.c have their own Notifier (are there any?)
+ * win/tclWinThrd.c can be modified to compile against both
+ Tcl 8.5 and Tcl 8.6
+ tclDecls.h is re-generated with "make genstubs"
+ This change complies with TIP #24
+ ***POTENTIAL INCOMPATIBILITY***
+
2008-07-23 Alexandre Ferrieux <ferrieux@users.sourceforge.net>
* tests/lrange.test: Added relative speed test to check for lrange
diff --git a/doc/Notifier.3 b/doc/Notifier.3
index b9d3495..4eddc54 100644
--- a/doc/Notifier.3
+++ b/doc/Notifier.3
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Notifier.3,v 1.22 2008/06/29 22:28:24 dkf Exp $
+'\" RCS: @(#) $Id: Notifier.3,v 1.23 2008/07/24 21:54:43 nijtmans Exp $
'\"
.so man.macros
.TH Notifier 3 8.1 Tcl "Tcl Library Procedures"
@@ -83,7 +83,7 @@ queues them.
.AP ClientData clientData in
Arbitrary one-word value to pass to \fIsetupProc\fR, \fIcheckProc\fR, or
\fIdeleteProc\fR.
-.AP Tcl_Time *timePtr in
+.AP "const Tcl_Time" *timePtr in
Indicates the maximum amount of time to wait for an event. This
is specified as an interval (how long to wait), not an absolute
time (when to wakeup). If the pointer passed to \fBTcl_WaitForEvent\fR
diff --git a/doc/Thread.3 b/doc/Thread.3
index 73ba742..97e759a 100644
--- a/doc/Thread.3
+++ b/doc/Thread.3
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Thread.3,v 1.29 2008/06/29 22:28:24 dkf Exp $
+'\" RCS: @(#) $Id: Thread.3,v 1.30 2008/07/24 21:54:43 nijtmans Exp $
'\"
.so man.macros
.TH Threads 3 "8.1" Tcl "Tcl Library Procedures"
@@ -48,7 +48,7 @@ int
A condition variable, which must be associated with a mutex lock.
.AP Tcl_Mutex *mutexPtr in
A mutex lock.
-.AP Tcl_Time *timePtr in
+.AP "const Tcl_Time" *timePtr in
A time limit on the condition wait. NULL to wait forever.
Note that a polling value of 0 seconds does not make much sense.
.AP Tcl_ThreadDataKey *keyPtr in
diff --git a/generic/tcl.decls b/generic/tcl.decls
index 60d85fa..f5cc117 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -12,7 +12,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: tcl.decls,v 1.137 2008/07/21 21:02:15 ferrieux Exp $
+# RCS: @(#) $Id: tcl.decls,v 1.138 2008/07/24 21:54:39 nijtmans Exp $
library tcl
@@ -72,13 +72,13 @@ declare 10 unix {
void Tcl_DeleteFileHandler(int fd)
}
declare 11 generic {
- void Tcl_SetTimer(Tcl_Time *timePtr)
+ void Tcl_SetTimer(CONST86 Tcl_Time *timePtr)
}
declare 12 generic {
void Tcl_Sleep(int ms)
}
declare 13 generic {
- int Tcl_WaitForEvent(Tcl_Time *timePtr)
+ int Tcl_WaitForEvent(CONST86 Tcl_Time *timePtr)
}
declare 14 generic {
int Tcl_AppendAllObjTypes(Tcl_Interp *interp, Tcl_Obj *objPtr)
@@ -813,7 +813,7 @@ declare 228 generic {
void Tcl_SetErrorCode(Tcl_Interp *interp, ...)
}
declare 229 generic {
- void Tcl_SetMaxBlockTime(Tcl_Time *timePtr)
+ void Tcl_SetMaxBlockTime(CONST86 Tcl_Time *timePtr)
}
declare 230 generic {
void Tcl_SetPanicProc(Tcl_PanicProc *panicProc)
@@ -1119,7 +1119,7 @@ declare 310 generic {
}
declare 311 generic {
void Tcl_ConditionWait(Tcl_Condition *condPtr, Tcl_Mutex *mutexPtr,
- Tcl_Time *timePtr)
+ CONST86 Tcl_Time *timePtr)
}
declare 312 generic {
int Tcl_NumUtfChars(CONST char *src, int length)
diff --git a/generic/tcl.h b/generic/tcl.h
index ef6d360..6b539ea 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tcl.h,v 1.261 2008/07/18 13:46:43 msofer Exp $
+ * RCS: @(#) $Id: tcl.h,v 1.262 2008/07/24 21:54:38 nijtmans Exp $
*/
#ifndef _TCL
@@ -145,7 +145,7 @@ extern "C" {
*
* The following TCL_VARARGS* macros are to support old extensions
* written for older versions of Tcl where the macros permitted
- * support for the varargs.h system as well as stdarg.h .
+ * support for the varargs.h system as well as stdarg.h .
*
* New code should just directly be written to use stdarg.h conventions.
*/
@@ -167,7 +167,7 @@ extern "C" {
* Note: when building static but linking dynamically to MSVCRT we must still
* correctly decorate the C library imported function. Use CRTIMPORT
* for this purpose. _DLL is defined by the compiler when linking to
- * MSVCRT.
+ * MSVCRT.
*/
#if (defined(__WIN32__) && (defined(_MSC_VER) || (__BORLANDC__ >= 0x0550) || defined(__LCC__) || defined(__WATCOMC__) || (defined(__GNUC__) && defined(__declspec))))
@@ -261,6 +261,8 @@ extern "C" {
# endif
#endif
+#define CONST86 CONST84
+
/*
* Make sure EXTERN isn't defined elsewhere
*/
@@ -987,7 +989,7 @@ typedef struct Tcl_DString {
* stack for the script in progress to be
* completely unwound.
* TCL_EVAL_NOERR: Do no exception reporting at all, just return
- * as the caller will report.
+ * as the caller will report.
*/
#define TCL_NO_EVAL 0x10000
#define TCL_EVAL_GLOBAL 0x20000
@@ -1341,8 +1343,8 @@ typedef struct Tcl_Time {
long usec; /* Microseconds. */
} Tcl_Time;
-typedef void (Tcl_SetTimerProc) _ANSI_ARGS_((Tcl_Time *timePtr));
-typedef int (Tcl_WaitForEventProc) _ANSI_ARGS_((Tcl_Time *timePtr));
+typedef void (Tcl_SetTimerProc) _ANSI_ARGS_((CONST86 Tcl_Time *timePtr));
+typedef int (Tcl_WaitForEventProc) _ANSI_ARGS_((CONST86 Tcl_Time *timePtr));
/*
* TIP #233 (Virtualized Time)
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index 53ed4c6..1603726 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclDecls.h,v 1.139 2008/07/22 23:01:31 das Exp $
+ * RCS: @(#) $Id: tclDecls.h,v 1.140 2008/07/24 21:54:39 nijtmans Exp $
*/
#ifndef _TCLDECLS
@@ -122,7 +122,7 @@ EXTERN void Tcl_DeleteFileHandler (int fd);
#ifndef Tcl_SetTimer_TCL_DECLARED
#define Tcl_SetTimer_TCL_DECLARED
/* 11 */
-EXTERN void Tcl_SetTimer (Tcl_Time * timePtr);
+EXTERN void Tcl_SetTimer (CONST86 Tcl_Time * timePtr);
#endif
#ifndef Tcl_Sleep_TCL_DECLARED
#define Tcl_Sleep_TCL_DECLARED
@@ -132,7 +132,7 @@ EXTERN void Tcl_Sleep (int ms);
#ifndef Tcl_WaitForEvent_TCL_DECLARED
#define Tcl_WaitForEvent_TCL_DECLARED
/* 13 */
-EXTERN int Tcl_WaitForEvent (Tcl_Time * timePtr);
+EXTERN int Tcl_WaitForEvent (CONST86 Tcl_Time * timePtr);
#endif
#ifndef Tcl_AppendAllObjTypes_TCL_DECLARED
#define Tcl_AppendAllObjTypes_TCL_DECLARED
@@ -1440,7 +1440,7 @@ EXTERN void Tcl_SetErrorCode (Tcl_Interp * interp, ...);
#ifndef Tcl_SetMaxBlockTime_TCL_DECLARED
#define Tcl_SetMaxBlockTime_TCL_DECLARED
/* 229 */
-EXTERN void Tcl_SetMaxBlockTime (Tcl_Time * timePtr);
+EXTERN void Tcl_SetMaxBlockTime (CONST86 Tcl_Time * timePtr);
#endif
#ifndef Tcl_SetPanicProc_TCL_DECLARED
#define Tcl_SetPanicProc_TCL_DECLARED
@@ -1931,7 +1931,8 @@ EXTERN void Tcl_ConditionNotify (Tcl_Condition * condPtr);
#define Tcl_ConditionWait_TCL_DECLARED
/* 311 */
EXTERN void Tcl_ConditionWait (Tcl_Condition * condPtr,
- Tcl_Mutex * mutexPtr, Tcl_Time * timePtr);
+ Tcl_Mutex * mutexPtr,
+ CONST86 Tcl_Time * timePtr);
#endif
#ifndef Tcl_NumUtfChars_TCL_DECLARED
#define Tcl_NumUtfChars_TCL_DECLARED
@@ -3601,9 +3602,9 @@ typedef struct TclStubs {
#ifdef MAC_OSX_TCL /* MACOSX */
void (*tcl_DeleteFileHandler) (int fd); /* 10 */
#endif /* MACOSX */
- void (*tcl_SetTimer) (Tcl_Time * timePtr); /* 11 */
+ void (*tcl_SetTimer) (CONST86 Tcl_Time * timePtr); /* 11 */
void (*tcl_Sleep) (int ms); /* 12 */
- int (*tcl_WaitForEvent) (Tcl_Time * timePtr); /* 13 */
+ int (*tcl_WaitForEvent) (CONST86 Tcl_Time * timePtr); /* 13 */
int (*tcl_AppendAllObjTypes) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 14 */
void (*tcl_AppendStringsToObj) (Tcl_Obj * objPtr, ...); /* 15 */
void (*tcl_AppendToObj) (Tcl_Obj* objPtr, CONST char* bytes, int length); /* 16 */
@@ -3851,7 +3852,7 @@ typedef struct TclStubs {
int (*tcl_SetCommandInfo) (Tcl_Interp * interp, CONST char * cmdName, CONST Tcl_CmdInfo * infoPtr); /* 226 */
void (*tcl_SetErrno) (int err); /* 227 */
void (*tcl_SetErrorCode) (Tcl_Interp * interp, ...); /* 228 */
- void (*tcl_SetMaxBlockTime) (Tcl_Time * timePtr); /* 229 */
+ void (*tcl_SetMaxBlockTime) (CONST86 Tcl_Time * timePtr); /* 229 */
void (*tcl_SetPanicProc) (Tcl_PanicProc * panicProc); /* 230 */
int (*tcl_SetRecursionLimit) (Tcl_Interp * interp, int depth); /* 231 */
void (*tcl_SetResult) (Tcl_Interp * interp, char * result, Tcl_FreeProc * freeProc); /* 232 */
@@ -3933,7 +3934,7 @@ typedef struct TclStubs {
void (*tcl_MutexLock) (Tcl_Mutex * mutexPtr); /* 308 */
void (*tcl_MutexUnlock) (Tcl_Mutex * mutexPtr); /* 309 */
void (*tcl_ConditionNotify) (Tcl_Condition * condPtr); /* 310 */
- void (*tcl_ConditionWait) (Tcl_Condition * condPtr, Tcl_Mutex * mutexPtr, Tcl_Time * timePtr); /* 311 */
+ void (*tcl_ConditionWait) (Tcl_Condition * condPtr, Tcl_Mutex * mutexPtr, CONST86 Tcl_Time * timePtr); /* 311 */
int (*tcl_NumUtfChars) (CONST char * src, int length); /* 312 */
int (*tcl_ReadChars) (Tcl_Channel channel, Tcl_Obj * objPtr, int charsToRead, int appendFlag); /* 313 */
void (*tcl_RestoreResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 314 */
diff --git a/generic/tclNotify.c b/generic/tclNotify.c
index 0e13379..e6c4d40 100644
--- a/generic/tclNotify.c
+++ b/generic/tclNotify.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclNotify.c,v 1.27 2008/06/13 05:45:14 mistachkin Exp $
+ * RCS: @(#) $Id: tclNotify.c,v 1.28 2008/07/24 21:54:38 nijtmans Exp $
*/
#include "tclInt.h"
@@ -794,7 +794,7 @@ Tcl_SetServiceMode(
void
Tcl_SetMaxBlockTime(
- Tcl_Time *timePtr) /* Specifies a maximum elapsed time for the
+ const Tcl_Time *timePtr) /* Specifies a maximum elapsed time for the
* next blocking operation in the event
* tsdPtr-> */
{
diff --git a/generic/tclThread.c b/generic/tclThread.c
index 1a544e3..0feba5b 100644
--- a/generic/tclThread.c
+++ b/generic/tclThread.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclThread.c,v 1.20 2008/05/09 04:58:54 georgeps Exp $
+ * RCS: @(#) $Id: tclThread.c,v 1.21 2008/07/24 21:54:39 nijtmans Exp $
*/
#include "tclInt.h"
@@ -125,7 +125,7 @@ Tcl_GetThreadData(
void *
TclThreadDataKeyGet(
Tcl_ThreadDataKey *keyPtr) /* Identifier for the data chunk. */
-
+
{
#ifdef TCL_THREADS
return TclThreadStorageKeyGet(keyPtr);
@@ -405,7 +405,7 @@ TclFinalizeSynchronization(void)
}
keyRecord.max = 0;
keyRecord.num = 0;
-
+
#ifdef TCL_THREADS
/*
* Call thread storage master cleanup.
@@ -496,7 +496,7 @@ void
Tcl_ConditionWait(
Tcl_Condition *condPtr, /* Really (pthread_cond_t **) */
Tcl_Mutex *mutexPtr, /* Really (pthread_mutex_t **) */
- Tcl_Time *timePtr) /* Timeout on waiting period */
+ const Tcl_Time *timePtr) /* Timeout on waiting period */
{
}
diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c
index 419cc48..125307e 100644
--- a/macosx/tclMacOSXNotify.c
+++ b/macosx/tclMacOSXNotify.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.19 2008/04/16 14:29:25 das Exp $
+ * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.20 2008/07/24 21:54:43 nijtmans Exp $
*/
#include "tclInt.h"
@@ -605,7 +605,7 @@ Tcl_AlertNotifier(
void
Tcl_SetTimer(
- Tcl_Time *timePtr) /* Timeout value, may be NULL. */
+ const Tcl_Time *timePtr) /* Timeout value, may be NULL. */
{
if (tclNotifierHooks.setTimerProc) {
tclNotifierHooks.setTimerProc(timePtr);
@@ -903,7 +903,7 @@ FileHandlerEventProc(
int
Tcl_WaitForEvent(
- Tcl_Time *timePtr) /* Maximum block time, or NULL. */
+ const Tcl_Time *timePtr) /* Maximum block time, or NULL. */
{
if (tclNotifierHooks.waitForEventProc) {
return tclNotifierHooks.waitForEventProc(timePtr);
diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c
index a763b1d..e285f03 100644
--- a/unix/tclUnixNotfy.c
+++ b/unix/tclUnixNotfy.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixNotfy.c,v 1.35 2008/04/16 14:29:26 das Exp $
+ * RCS: @(#) $Id: tclUnixNotfy.c,v 1.36 2008/07/24 21:54:42 nijtmans Exp $
*/
#include "tclInt.h"
@@ -371,7 +371,7 @@ Tcl_AlertNotifier(
void
Tcl_SetTimer(
- Tcl_Time *timePtr) /* Timeout value, may be NULL. */
+ const Tcl_Time *timePtr) /* Timeout value, may be NULL. */
{
if (tclNotifierHooks.setTimerProc) {
tclNotifierHooks.setTimerProc(timePtr);
@@ -669,7 +669,7 @@ FileHandlerEventProc(
int
Tcl_WaitForEvent(
- Tcl_Time *timePtr) /* Maximum block time, or NULL. */
+ const Tcl_Time *timePtr) /* Maximum block time, or NULL. */
{
if (tclNotifierHooks.waitForEventProc) {
return tclNotifierHooks.waitForEventProc(timePtr);
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index 63e8733..d122f41 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixThrd.c,v 1.58 2008/05/09 04:58:54 georgeps Exp $
+ * RCS: @(#) $Id: tclUnixThrd.c,v 1.59 2008/07/24 21:54:42 nijtmans Exp $
*/
#include "tclInt.h"
@@ -224,13 +224,13 @@ TclpThreadGetStackSize(void)
#if defined(HAVE_PTHREAD_ATTR_SETSTACKSIZE) && defined(TclpPthreadGetAttrs)
pthread_attr_t threadAttr; /* This will hold the thread attributes for
* the current thread. */
-#ifdef __GLIBC__
+#ifdef __GLIBC__
/*
* Fix for [Bug 1815573]
*
* DESCRIPTION:
* On linux TclpPthreadGetAttrs (which is pthread_attr_get_np) may return
- * bogus values on the initial thread.
+ * bogus values on the initial thread.
*
* ASSUMPTIONS:
* There seems to be no api to determine if we are on the initial
@@ -268,7 +268,7 @@ TclpThreadGetStackSize(void)
}
}
-
+
if (pthread_attr_getstacksize(&threadAttr, &stackSize) != 0) {
pthread_attr_destroy(&threadAttr);
return (size_t)-1;
@@ -279,7 +279,7 @@ TclpThreadGetStackSize(void)
/*
* On Darwin, the API below does not return the correct stack size for the
* main thread (which is not a real pthread), so fallback to getrlimit().
- */
+ */
if (!pthread_main_np())
#endif
stackSize = pthread_get_stacksize_np(pthread_self());
@@ -617,7 +617,7 @@ void
Tcl_ConditionWait(
Tcl_Condition *condPtr, /* Really (pthread_cond_t **) */
Tcl_Mutex *mutexPtr, /* Really (pthread_mutex_t **) */
- Tcl_Time *timePtr) /* Timeout on waiting period */
+ const Tcl_Time *timePtr) /* Timeout on waiting period */
{
pthread_cond_t *pcondPtr;
pthread_mutex_t *pmutexPtr;
@@ -882,7 +882,7 @@ void TclpThreadDeleteKey(void *keyPtr) {
void TclpThreadSetMasterTSD(void *tsdKeyPtr, void *ptr) {
pthread_key_t *key = tsdKeyPtr;
-
+
if (pthread_setspecific(*key, ptr)) {
Tcl_Panic("unable to set master TSD value");
}
diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c
index 8d19ba2..436d333 100644
--- a/win/tclWinNotify.c
+++ b/win/tclWinNotify.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinNotify.c,v 1.23 2008/06/13 05:45:15 mistachkin Exp $
+ * RCS: @(#) $Id: tclWinNotify.c,v 1.24 2008/07/24 21:54:43 nijtmans Exp $
*/
#include "tclInt.h"
@@ -268,7 +268,7 @@ Tcl_AlertNotifier(
void
Tcl_SetTimer(
- Tcl_Time *timePtr) /* Maximum block time, or NULL. */
+ const Tcl_Time *timePtr) /* Maximum block time, or NULL. */
{
if (tclNotifierHooks.setTimerProc) {
tclNotifierHooks.setTimerProc(timePtr);
@@ -431,7 +431,7 @@ NotifierProc(
int
Tcl_WaitForEvent(
- Tcl_Time *timePtr) /* Maximum block time, or NULL. */
+ const Tcl_Time *timePtr) /* Maximum block time, or NULL. */
{
if (tclNotifierHooks.waitForEventProc) {
return tclNotifierHooks.waitForEventProc(timePtr);
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index d9dd0f7..9667d7d 100644
--- a/win/tclWinThrd.c
+++ b/win/tclWinThrd.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinThrd.c,v 1.47 2008/07/16 23:31:29 georgeps Exp $
+ * RCS: @(#) $Id: tclWinThrd.c,v 1.48 2008/07/24 21:54:43 nijtmans Exp $
*/
#include "tclWinInt.h"
@@ -590,7 +590,7 @@ void
Tcl_ConditionWait(
Tcl_Condition *condPtr, /* Really (WinCondition **) */
Tcl_Mutex *mutexPtr, /* Really (CRITICAL_SECTION **) */
- Tcl_Time *timePtr) /* Timeout on waiting period */
+ const Tcl_Time *timePtr) /* Timeout on waiting period */
{
WinCondition *winCondPtr; /* Per-condition queue head */
CRITICAL_SECTION *csPtr; /* Caller's Mutex, after casting */
@@ -967,13 +967,13 @@ void *TclpThreadCreateKey (void) {
if (key == NULL) {
Tcl_Panic("unable to allocate thread key!");
}
-
+
*key = TlsAlloc();
if (*key == TLS_OUT_OF_INDEXES) {
Tcl_Panic("unable to allocate thread-local storage");
}
-
+
return key;
}
@@ -989,7 +989,7 @@ void TclpThreadDeleteKey(void *keyPtr) {
void TclpThreadSetMasterTSD(void *tsdKeyPtr, void *ptr) {
DWORD *key = tsdKeyPtr;
-
+
if (!TlsSetValue(*key, ptr)) {
Tcl_Panic("unable to set master TSD value");
}