summaryrefslogtreecommitdiffstats
path: root/generic/tclOOCall.c
diff options
context:
space:
mode:
authordas <das>2008-05-31 23:35:27 (GMT)
committerdas <das>2008-05-31 23:35:27 (GMT)
commitc15ddd7ee91e72940a679b63fe643f1a21b4b006 (patch)
tree8421cfbab846400cfd9d99c73da61dbace260bf9 /generic/tclOOCall.c
parentcb040a93eb1479ce0896588e2e4cad823dab7b55 (diff)
downloadtcl-c15ddd7ee91e72940a679b63fe643f1a21b4b006.zip
tcl-c15ddd7ee91e72940a679b63fe643f1a21b4b006.tar.gz
tcl-c15ddd7ee91e72940a679b63fe643f1a21b4b006.tar.bz2
* generic/tclOOStubLib.c: ensure use of tcl stubs; include in
* unix/Makefile.in: stub lib; disable broken tclOO genstubs * generic/tclOO.c: make tclOO stubs tables 'static const' * generic/tclOODecls.h: and stub table pointers MODULE_SCOPE * generic/tclOOIntDecls.h: (change generated files manually * generic/tclOOStubInit.c: pending genstubs support for tclOO). * generic/tclOOStubLib.c: * generic/tclOO.c: fix warnings for 'int<->ptr conversion' * generic/tclOOCall.c: and 'signed vs unsigned comparison'. * generic/tclOOMethod.c:
Diffstat (limited to 'generic/tclOOCall.c')
-rw-r--r--generic/tclOOCall.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c
index 551a3fd..8a4024d 100644
--- a/generic/tclOOCall.c
+++ b/generic/tclOOCall.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclOOCall.c,v 1.4 2008/05/31 11:42:17 dkf Exp $
+ * RCS: @(#) $Id: tclOOCall.c,v 1.5 2008/05/31 23:35:27 das Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -359,7 +359,7 @@ TclOOGetSortedMethodList(
isWantedIn = ((!(flags & PUBLIC_METHOD)
|| mPtr->flags & PUBLIC_METHOD) ? IN_LIST : 0);
isWantedIn |= (mPtr->typePtr == NULL ? NO_IMPLEMENTATION : 0);
- Tcl_SetHashValue(hPtr, (void *) isWantedIn);
+ Tcl_SetHashValue(hPtr, INT2PTR(isWantedIn));
}
}
}
@@ -379,12 +379,12 @@ TclOOGetSortedMethodList(
if (mPtr->typePtr == NULL) {
isWantedIn |= NO_IMPLEMENTATION;
}
- Tcl_SetHashValue(hPtr, (void *) isWantedIn);
+ Tcl_SetHashValue(hPtr, INT2PTR(isWantedIn));
} else if (mPtr->typePtr != NULL) {
- isWantedIn = (int) Tcl_GetHashValue(hPtr);
+ isWantedIn = PTR2INT(Tcl_GetHashValue(hPtr));
if (isWantedIn & NO_IMPLEMENTATION) {
isWantedIn &= ~NO_IMPLEMENTATION;
- Tcl_SetHashValue(hPtr, (void *) isWantedIn);
+ Tcl_SetHashValue(hPtr, INT2PTR(isWantedIn));
}
}
}
@@ -418,8 +418,8 @@ TclOOGetSortedMethodList(
strings = (const char **) ckalloc(sizeof(char *) * names.numEntries);
FOREACH_HASH(namePtr, isWanted, &names) {
- if (!(flags & PUBLIC_METHOD) || (((int)isWanted) & IN_LIST)) {
- if (((int)isWanted) & NO_IMPLEMENTATION) {
+ if (!(flags & PUBLIC_METHOD) || (PTR2INT(isWanted) & IN_LIST)) {
+ if (PTR2INT(isWanted) & NO_IMPLEMENTATION) {
continue;
}
strings[i++] = TclGetString(namePtr);
@@ -479,8 +479,8 @@ TclOOGetSortedClassMethodList(
strings = (const char **) ckalloc(sizeof(char *) * names.numEntries);
FOREACH_HASH(namePtr, isWanted, &names) {
- if (!(flags & PUBLIC_METHOD) || (((int)isWanted) & IN_LIST)) {
- if (((int)isWanted) & NO_IMPLEMENTATION) {
+ if (!(flags & PUBLIC_METHOD) || (PTR2INT(isWanted) & IN_LIST)) {
+ if (PTR2INT(isWanted) & NO_IMPLEMENTATION) {
continue;
}
strings[i++] = TclGetString(namePtr);
@@ -567,13 +567,13 @@ AddClassMethodNames(
int isWanted = (!(flags & PUBLIC_METHOD)
|| (mPtr->flags & PUBLIC_METHOD)) ? IN_LIST : 0;
- Tcl_SetHashValue(hPtr, (void *) isWanted);
- } else if ((((int)Tcl_GetHashValue(hPtr)) & NO_IMPLEMENTATION)
+ Tcl_SetHashValue(hPtr, INT2PTR(isWanted));
+ } else if ((PTR2INT(Tcl_GetHashValue(hPtr)) & NO_IMPLEMENTATION)
&& mPtr->typePtr != NULL) {
- int isWanted = (int) Tcl_GetHashValue(hPtr);
+ int isWanted = PTR2INT(Tcl_GetHashValue(hPtr));
isWanted &= ~NO_IMPLEMENTATION;
- Tcl_SetHashValue(hPtr, (void *) isWanted);
+ Tcl_SetHashValue(hPtr, INT2PTR(isWanted));
}
}