summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-06-16 14:49:50 (GMT)
committernijtmans <nijtmans>2010-06-16 14:49:50 (GMT)
commit895f05f712393e5e7629384b1690690c6f866974 (patch)
tree089f9fd54e012a12bd858f538ba697f61a08789e /generic
parenteb98df8fef94944b7b479387e27232beab5e869d (diff)
downloadtcl-895f05f712393e5e7629384b1690690c6f866974.zip
tcl-895f05f712393e5e7629384b1690690c6f866974.tar.gz
tcl-895f05f712393e5e7629384b1690690c6f866974.tar.bz2
Simplify Tcl_AppInit and *_Init definitions.
Change TclpThreadCreate and Tcl_CreateThread signature, making clear that "proc" is a function pointer, as in all other "proc" function parameters.
Diffstat (limited to 'generic')
-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
6 files changed, 24 insertions, 32 deletions
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