summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--doc/Class.36
-rw-r--r--doc/Thread.310
-rw-r--r--generic/tcl.decls4
-rw-r--r--generic/tcl.h18
-rw-r--r--generic/tclDecls.h6
-rw-r--r--generic/tclEvent.c8
-rw-r--r--generic/tclInt.h16
-rw-r--r--generic/tclTestProcBodyObj.c4
-rw-r--r--unix/.cvsignore1
-rw-r--r--unix/tclUnixThrd.c4
-rw-r--r--win/tclWinThrd.c4
12 files changed, 47 insertions, 44 deletions
diff --git a/ChangeLog b/ChangeLog
index f1e09f3..f61e60e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,16 @@
* tools/loadICU.tcl [Bug 3016135] traceback using clock format with
* library/msgs/he.msg locale of he_IL
+ * generic/tcl.h Simplify Tcl_AppInit and *_Init definitions,
+ * generic/tclInt.h spacing. Change TclpThreadCreate and Tcl_CreateThread
+ * generic/tcl.decls signature, making clear that "proc" is a function
+ * generic/tclDecls.h pointer, as in all other "proc" function parameters.
+ * generic/tclEvent.c
+ * generic/tclTestProcBodyObj.c
+ * win/tclWinThrd.c
+ * unix/tclUnixThrd.c
+ * doc/Thread.3
+ * doc/Class.3 Fix Tcl_ObjectMetadataType definition
2010-06-14 Jan Nijtmans <nijtmans@users.sf.net>
diff --git a/doc/Class.3 b/doc/Class.3
index b9f3460..0dea97f 100644
--- a/doc/Class.3
+++ b/doc/Class.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Class.3,v 1.5 2009/11/27 14:35:10 dkf Exp $
+'\" RCS: @(#) $Id: Class.3,v 1.6 2010/06/16 14:49:51 nijtmans Exp $
'\"
.so man.macros
.TH Tcl_Class 3 0.1 TclOO "TclOO Library Functions"
@@ -146,8 +146,8 @@ The contents of the Tcl_ObjectMetadataType structure are as follows:
typedef const struct {
int \fIversion\fR;
const char *\fIname\fR;
- Tcl_ObjectMetadataDeleteProc \fIdeleteProc\fR;
- Tcl_CloneProc \fIcloneProc\fR;
+ Tcl_ObjectMetadataDeleteProc *\fIdeleteProc\fR;
+ Tcl_CloneProc *\fIcloneProc\fR;
} \fBTcl_ObjectMetadataType\fR;
.CE
.PP
diff --git a/doc/Thread.3 b/doc/Thread.3
index e5ea559..9b9912e 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.31 2010/03/31 14:14:04 dkf Exp $
+'\" RCS: @(#) $Id: Thread.3,v 1.32 2010/06/16 14:49:51 nijtmans Exp $
'\"
.so man.macros
.TH Threads 3 "8.1" Tcl "Tcl Library Procedures"
@@ -38,12 +38,12 @@ void
\fBTcl_MutexFinalize\fR(\fImutexPtr\fR)
.sp
int
-\fBTcl_CreateThread\fR(\fIidPtr, threadProc, clientData, stackSize, flags\fR)
+\fBTcl_CreateThread\fR(\fIidPtr, proc, clientData, stackSize, flags\fR)
.sp
int
\fBTcl_JoinThread\fR(\fIid, result\fR)
.SH ARGUMENTS
-.AS Tcl_CreateThreadProc threadProc out
+.AS Tcl_CreateThreadProc proc out
.AP Tcl_Condition *condPtr in
A condition variable, which must be associated with a mutex lock.
.AP Tcl_Mutex *mutexPtr in
@@ -64,11 +64,11 @@ The referred storage will contain the id of the newly created thread as
returned by the operating system.
.AP Tcl_ThreadId id in
Id of the thread waited upon.
-.AP Tcl_ThreadCreateProc threadProc in
+.AP Tcl_ThreadCreateProc *proc in
This procedure will act as the \fBmain()\fR of the newly created
thread. The specified \fIclientData\fR will be its sole argument.
.AP ClientData clientData in
-Arbitrary information. Passed as sole argument to the \fIthreadProc\fR.
+Arbitrary information. Passed as sole argument to the \fIproc\fR.
.AP int stackSize in
The size of the stack given to the new thread.
.AP int flags in
diff --git a/generic/tcl.decls b/generic/tcl.decls
index b090747..303ac8e 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.174 2010/04/02 23:11:55 nijtmans Exp $
+# RCS: @(#) $Id: tcl.decls,v 1.175 2010/06/16 14:49:50 nijtmans Exp $
library tcl
@@ -1391,7 +1391,7 @@ declare 392 generic {
void Tcl_MutexFinalize(Tcl_Mutex *mutex)
}
declare 393 generic {
- int Tcl_CreateThread(Tcl_ThreadId *idPtr, Tcl_ThreadCreateProc proc,
+ int Tcl_CreateThread(Tcl_ThreadId *idPtr, Tcl_ThreadCreateProc *proc,
ClientData clientData, int stackSize, int flags)
}
diff --git a/generic/tcl.h b/generic/tcl.h
index 9a437dc..169f6f2 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.306 2010/04/30 21:15:42 dgp Exp $
+ * RCS: @(#) $Id: tcl.h,v 1.307 2010/06/16 14:49:51 nijtmans Exp $
*/
#ifndef _TCL
@@ -312,9 +312,9 @@ typedef long LONG;
*/
#ifndef NO_VOID
-#define VOID void
+# define VOID void
#else
-#define VOID char
+# define VOID char
#endif
/*
@@ -1019,8 +1019,8 @@ typedef struct Tcl_DString {
* TCL_CANCEL_UNWIND: Magical Tcl_CancelEval mode that causes the
* 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.
+ * TCL_EVAL_NOERR: Do no exception reporting at all, just return
+ * as the caller will report.
*/
#define TCL_NO_EVAL 0x010000
@@ -2566,13 +2566,7 @@ EXTERN void Tcl_GetMemoryInfo(Tcl_DString *dsPtr);
* neither DLLEXPORT nor DLLIMPORT.
*/
-#undef TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS
-
-EXTERN int Tcl_AppInit(Tcl_Interp *interp);
-
-#undef TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLIMPORT
+extern Tcl_AppInitProc Tcl_AppInit;
#endif /* RC_INVOKED */
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index 39f53fc..f0bccc6 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.176 2010/04/02 23:11:55 nijtmans Exp $
+ * RCS: @(#) $Id: tclDecls.h,v 1.177 2010/06/16 14:49:51 nijtmans Exp $
*/
#ifndef _TCLDECLS
@@ -2319,7 +2319,7 @@ EXTERN void Tcl_MutexFinalize(Tcl_Mutex *mutex);
#define Tcl_CreateThread_TCL_DECLARED
/* 393 */
EXTERN int Tcl_CreateThread(Tcl_ThreadId *idPtr,
- Tcl_ThreadCreateProc proc,
+ Tcl_ThreadCreateProc *proc,
ClientData clientData, int stackSize,
int flags);
#endif
@@ -4131,7 +4131,7 @@ typedef struct TclStubs {
int (*tcl_ProcObjCmd) (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* 390 */
void (*tcl_ConditionFinalize) (Tcl_Condition *condPtr); /* 391 */
void (*tcl_MutexFinalize) (Tcl_Mutex *mutex); /* 392 */
- int (*tcl_CreateThread) (Tcl_ThreadId *idPtr, Tcl_ThreadCreateProc proc, ClientData clientData, int stackSize, int flags); /* 393 */
+ int (*tcl_CreateThread) (Tcl_ThreadId *idPtr, Tcl_ThreadCreateProc *proc, ClientData clientData, int stackSize, int flags); /* 393 */
int (*tcl_ReadRaw) (Tcl_Channel chan, char *dst, int bytesToRead); /* 394 */
int (*tcl_WriteRaw) (Tcl_Channel chan, const char *src, int srcLen); /* 395 */
Tcl_Channel (*tcl_GetTopChannel) (Tcl_Channel chan); /* 396 */
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index e8f8072..ad87cd5 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.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: tclEvent.c,v 1.92 2010/02/24 10:45:04 dkf Exp $
+ * RCS: @(#) $Id: tclEvent.c,v 1.93 2010/06/16 14:49:50 nijtmans Exp $
*/
#include "tclInt.h"
@@ -263,7 +263,7 @@ HandleBgErrors(
} else if ((code == TCL_ERROR) && !Tcl_IsSafe(interp)) {
Tcl_Channel errChannel = Tcl_GetStdChannel(TCL_STDERR);
- if (errChannel != (Tcl_Channel) NULL) {
+ if (errChannel != NULL) {
Tcl_Obj *options = Tcl_GetReturnOptions(interp, code);
Tcl_Obj *keyPtr, *valuePtr;
@@ -454,7 +454,7 @@ TclDefaultBgErrorHandlerObjCmd(
} else {
Tcl_Channel errChannel = Tcl_GetStdChannel(TCL_STDERR);
- if (errChannel != (Tcl_Channel) NULL) {
+ if (errChannel != NULL) {
Tcl_Obj *resultPtr = Tcl_GetObjResult(interp);
Tcl_IncrRefCount(resultPtr);
@@ -1579,7 +1579,7 @@ NewThreadProc(
int
Tcl_CreateThread(
Tcl_ThreadId *idPtr, /* Return, the ID of the thread */
- Tcl_ThreadCreateProc proc, /* Main() function of the thread */
+ Tcl_ThreadCreateProc *proc, /* Main() function of the thread */
ClientData clientData, /* The one argument to Main() */
int stackSize, /* Size of stack for the new thread */
int flags) /* Flags controlling behaviour of the new
diff --git a/generic/tclInt.h b/generic/tclInt.h
index a03bfc2..19bde2f 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInt.h,v 1.477 2010/05/28 13:52:00 nijtmans Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.478 2010/06/16 14:49:50 nijtmans Exp $
*/
#ifndef _TCLINT
@@ -2997,7 +2997,7 @@ MODULE_SCOPE void TclpFinalizeMutex(Tcl_Mutex *mutexPtr);
MODULE_SCOPE void TclpFinalizePipes(void);
MODULE_SCOPE void TclpFinalizeSockets(void);
MODULE_SCOPE int TclpThreadCreate(Tcl_ThreadId *idPtr,
- Tcl_ThreadCreateProc proc, ClientData clientData,
+ Tcl_ThreadCreateProc *proc, ClientData clientData,
int stackSize, int flags);
MODULE_SCOPE int TclpFindVariable(const char *name, int *lengthPtr);
MODULE_SCOPE void TclpInitLibraryPath(char **valuePtr,
@@ -4157,7 +4157,7 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file,
*----------------------------------------------------------------------
*/
-MODULE_SCOPE int TclTommath_Init(Tcl_Interp *interp);
+MODULE_SCOPE Tcl_PackageInitProc TclTommath_Init;
MODULE_SCOPE void TclBNInitBignumFromLong(mp_int *bignum, long initVal);
MODULE_SCOPE void TclBNInitBignumFromWideInt(mp_int *bignum,
Tcl_WideInt initVal);
@@ -4174,11 +4174,11 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum,
*----------------------------------------------------------------------
*/
-MODULE_SCOPE int TclplatformtestInit(Tcl_Interp *interp);
-MODULE_SCOPE int TclObjTest_Init(Tcl_Interp *interp);
-MODULE_SCOPE int TclThread_Init(Tcl_Interp *interp);
-MODULE_SCOPE int Procbodytest_Init(Tcl_Interp *interp);
-MODULE_SCOPE int Procbodytest_SafeInit(Tcl_Interp *interp);
+MODULE_SCOPE Tcl_PackageInitProc TclplatformtestInit;
+MODULE_SCOPE Tcl_PackageInitProc TclObjTest_Init;
+MODULE_SCOPE Tcl_PackageInitProc TclThread_Init;
+MODULE_SCOPE Tcl_PackageInitProc Procbodytest_Init;
+MODULE_SCOPE Tcl_PackageInitProc Procbodytest_SafeInit;
/*
*----------------------------------------------------------------
diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c
index 2172869..6e0b670 100644
--- a/generic/tclTestProcBodyObj.c
+++ b/generic/tclTestProcBodyObj.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: tclTestProcBodyObj.c,v 1.11 2010/02/25 22:20:10 nijtmans Exp $
+ * RCS: @(#) $Id: tclTestProcBodyObj.c,v 1.12 2010/06/16 14:49:50 nijtmans Exp $
*/
#ifndef USE_TCL_STUBS
@@ -51,8 +51,6 @@ static int ProcBodyTestProcObjCmd(ClientData dummy,
static int ProcBodyTestInitInternal(Tcl_Interp *interp, int isSafe);
static int RegisterCommand(Tcl_Interp* interp,
const char *namespace, const CmdTable *cmdTablePtr);
-int Procbodytest_Init(Tcl_Interp * interp);
-int Procbodytest_SafeInit(Tcl_Interp * interp);
/*
* List of commands to create when the package is loaded; must go after the
diff --git a/unix/.cvsignore b/unix/.cvsignore
index 07d97c0..84db0f4 100644
--- a/unix/.cvsignore
+++ b/unix/.cvsignore
@@ -19,3 +19,4 @@ confdefs.h
*.so
pkg
*.dll
+xttest
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index 1766756..e1ffb9e 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.62 2010/03/05 14:34:04 dkf Exp $
+ * RCS: @(#) $Id: tclUnixThrd.c,v 1.63 2010/06/16 14:49:51 nijtmans Exp $
*/
#include "tclInt.h"
@@ -77,7 +77,7 @@ static pthread_mutex_t *allocLockPtr = &allocLock;
int
TclpThreadCreate(
Tcl_ThreadId *idPtr, /* Return, the ID of the thread */
- Tcl_ThreadCreateProc proc, /* Main() function of the thread */
+ Tcl_ThreadCreateProc *proc, /* Main() function of the thread */
ClientData clientData, /* The one argument to Main() */
int stackSize, /* Size of stack for the new thread */
int flags) /* Flags controlling behaviour of the new
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index 67e7350..7154496 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.52 2010/01/13 06:46:56 nijtmans Exp $
+ * RCS: @(#) $Id: tclWinThrd.c,v 1.53 2010/06/16 14:49:51 nijtmans Exp $
*/
#include "tclWinInt.h"
@@ -145,7 +145,7 @@ typedef struct allocMutex {
int
TclpThreadCreate(
Tcl_ThreadId *idPtr, /* Return, the ID of the thread. */
- Tcl_ThreadCreateProc proc, /* Main() function of the thread. */
+ Tcl_ThreadCreateProc *proc, /* Main() function of the thread. */
ClientData clientData, /* The one argument to Main(). */
int stackSize, /* Size of stack for the new thread. */
int flags) /* Flags controlling behaviour of the new