summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-08-31 20:48:16 (GMT)
committernijtmans <nijtmans>2010-08-31 20:48:16 (GMT)
commitc7a29d8a5192bc554c5019ba53d8041aa12eb963 (patch)
treec5dcdf908c44f77ddfcc3bd0b202a6614a1b9d7a /generic
parentf97a6571a6db13315c2b0767b1d178cd3330c4c3 (diff)
downloadtcl-c7a29d8a5192bc554c5019ba53d8041aa12eb963.zip
tcl-c7a29d8a5192bc554c5019ba53d8041aa12eb963.tar.gz
tcl-c7a29d8a5192bc554c5019ba53d8041aa12eb963.tar.bz2
[Patch 2997642] many type casts needed when using Tcl_Pkg* API. Remaining part.
Typo in rules.vc
Diffstat (limited to 'generic')
-rw-r--r--generic/tcl.decls4
-rw-r--r--generic/tclBasic.c5
-rw-r--r--generic/tclDecls.h6
-rw-r--r--generic/tclPkg.c8
-rw-r--r--generic/tclStubLib.c8
-rw-r--r--generic/tclTomMathInterface.c4
-rw-r--r--generic/tclTomMathStubLib.c9
7 files changed, 22 insertions, 22 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls
index 826c6a6..b871151 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.179 2010/08/30 13:49:27 nijtmans Exp $
+# RCS: @(#) $Id: tcl.decls,v 1.180 2010/08/31 20:48:16 nijtmans Exp $
library tcl
@@ -30,7 +30,7 @@ hooks {tclPlat tclInt tclIntPlat}
declare 0 generic {
int Tcl_PkgProvideEx(Tcl_Interp *interp, const char *name,
- const char *version, ClientData clientData)
+ const char *version, const void *clientData)
}
declare 1 generic {
CONST84_RETURN char *Tcl_PkgRequireEx(Tcl_Interp *interp,
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 6769211..211771a 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.464 2010/08/30 14:02:09 msofer Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.465 2010/08/31 20:48:17 nijtmans Exp $
*/
#include "tclInt.h"
@@ -923,8 +923,7 @@ Tcl_CreateInterp(void)
* TIP #268: Full patchlevel instead of just major.minor
*/
- Tcl_PkgProvideEx(interp, "Tcl", TCL_PATCH_LEVEL,
- (ClientData) &tclStubs);
+ Tcl_PkgProvideEx(interp, "Tcl", TCL_PATCH_LEVEL, &tclStubs);
if (TclTommath_Init(interp) != TCL_OK) {
Tcl_Panic(Tcl_GetString(Tcl_GetObjResult(interp)));
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index b993e38..3922548 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.184 2010/08/30 13:49:28 nijtmans Exp $
+ * RCS: @(#) $Id: tclDecls.h,v 1.185 2010/08/31 20:48:17 nijtmans Exp $
*/
#ifndef _TCLDECLS
@@ -40,7 +40,7 @@
/* 0 */
EXTERN int Tcl_PkgProvideEx(Tcl_Interp *interp,
const char *name, const char *version,
- ClientData clientData);
+ const void *clientData);
/* 1 */
EXTERN CONST84_RETURN char * Tcl_PkgRequireEx(Tcl_Interp *interp,
const char *name, const char *version,
@@ -1820,7 +1820,7 @@ typedef struct TclStubs {
int magic;
const struct TclStubHooks *hooks;
- int (*tcl_PkgProvideEx) (Tcl_Interp *interp, const char *name, const char *version, ClientData clientData); /* 0 */
+ int (*tcl_PkgProvideEx) (Tcl_Interp *interp, const char *name, const char *version, const void *clientData); /* 0 */
CONST84_RETURN char * (*tcl_PkgRequireEx) (Tcl_Interp *interp, const char *name, const char *version, int exact, void *clientDataPtr); /* 1 */
void (*tcl_Panic) (const char *format, ...); /* 2 */
char * (*tcl_Alloc) (unsigned int size); /* 3 */
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index cba612f..82a683c 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.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: tclPkg.c,v 1.43 2010/08/30 13:49:27 nijtmans Exp $
+ * RCS: @(#) $Id: tclPkg.c,v 1.44 2010/08/31 20:48:17 nijtmans Exp $
*
* TIP #268.
* Heavily rewritten to handle the extend version numbers, and extended
@@ -48,7 +48,7 @@ typedef struct Package {
* exist in this interpreter yet. */
PkgAvail *availPtr; /* First in list of all available versions of
* this package. */
- ClientData clientData; /* Client data. */
+ const void *clientData; /* Client data. */
} Package;
/*
@@ -124,7 +124,7 @@ Tcl_PkgProvideEx(
* available. */
const char *name, /* Name of package. */
const char *version, /* Version string for package. */
- ClientData clientData) /* clientdata for this package (normally used
+ const void *clientData) /* clientdata for this package (normally used
* for C callback function table) */
{
Package *pkgPtr;
@@ -621,7 +621,7 @@ PkgRequireCore(
if (satisfies) {
if (clientDataPtr) {
- ClientData *ptr = clientDataPtr;
+ const void **ptr = (const void **) clientDataPtr;
*ptr = pkgPtr->clientData;
}
return pkgPtr->version;
diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c
index db10cc8..0197741 100644
--- a/generic/tclStubLib.c
+++ b/generic/tclStubLib.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: tclStubLib.c,v 1.33 2010/08/30 13:49:28 nijtmans Exp $
+ * RCS: @(#) $Id: tclStubLib.c,v 1.34 2010/08/31 20:48:17 nijtmans Exp $
*/
/*
@@ -84,7 +84,7 @@ Tcl_InitStubs(
int exact)
{
const char *actualVersion = NULL;
- const TclStubs *stubsPtr;
+ ClientData pkgData = NULL;
/*
* We can't optimize this check by caching tclStubsPtr because that
@@ -97,7 +97,7 @@ Tcl_InitStubs(
return NULL;
}
- actualVersion = Tcl_PkgRequireEx(interp, "Tcl", version, 0, &stubsPtr);
+ actualVersion = Tcl_PkgRequireEx(interp, "Tcl", version, 0, &pkgData);
if (actualVersion == NULL) {
return NULL;
}
@@ -127,7 +127,7 @@ Tcl_InitStubs(
}
}
}
- tclStubsPtr = stubsPtr;
+ tclStubsPtr = (TclStubs *) pkgData;
if (tclStubsPtr->hooks) {
tclPlatStubsPtr = tclStubsPtr->hooks->tclPlatStubs;
diff --git a/generic/tclTomMathInterface.c b/generic/tclTomMathInterface.c
index eb93fe6..694b607 100644
--- a/generic/tclTomMathInterface.c
+++ b/generic/tclTomMathInterface.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclTomMathInterface.c,v 1.15 2010/04/27 12:36:21 nijtmans Exp $
+ * RCS: @(#) $Id: tclTomMathInterface.c,v 1.16 2010/08/31 20:48:17 nijtmans Exp $
*/
#include "tclInt.h"
@@ -44,7 +44,7 @@ TclTommath_Init(
/* TIP #268: Full patchlevel instead of just major.minor */
if (Tcl_PkgProvideEx(interp, "tcl::tommath", TCL_PATCH_LEVEL,
- (ClientData) &tclTomMathStubs) != TCL_OK) {
+ &tclTomMathStubs) != TCL_OK) {
return TCL_ERROR;
}
return TCL_OK;
diff --git a/generic/tclTomMathStubLib.c b/generic/tclTomMathStubLib.c
index 9c9cbc5..1f21bee 100644
--- a/generic/tclTomMathStubLib.c
+++ b/generic/tclTomMathStubLib.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: tclTomMathStubLib.c,v 1.2 2010/08/30 13:49:28 nijtmans Exp $
+ * RCS: @(#) $Id: tclTomMathStubLib.c,v 1.3 2010/08/31 20:48:17 nijtmans Exp $
*/
/*
@@ -57,14 +57,15 @@ TclTomMathInitializeStubs(
int exact = 0;
const char *packageName = "tcl::tommath";
const char *errMsg = NULL;
- const TclTomMathStubs *stubsPtr;
+ ClientData pkgClientData = NULL;
const char *actualVersion =
- Tcl_PkgRequireEx(interp, packageName, version, exact, &stubsPtr);
+ Tcl_PkgRequireEx(interp, packageName, version, exact, &pkgClientData);
+ const TclTomMathStubs *stubsPtr = pkgClientData;
if (actualVersion == NULL) {
return NULL;
}
- if (stubsPtr == NULL) {
+ if (pkgClientData == NULL) {
errMsg = "missing stub table pointer";
} else if ((stubsPtr->tclBN_epoch)() != epoch) {
errMsg = "epoch number mismatch";