diff options
author | hobbs <hobbs> | 2002-02-16 00:37:54 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2002-02-16 00:37:54 (GMT) |
commit | f6f633062717623bc482679f9082c4236df642b0 (patch) | |
tree | dc5353569c6ef44bf58ddda38b3e86ce0dd2d21a | |
parent | b5e9e40d2f0d57b15ea03e954e1c2085b9874fed (diff) | |
download | tcl-f6f633062717623bc482679f9082c4236df642b0.zip tcl-f6f633062717623bc482679f9082c4236df642b0.tar.gz tcl-f6f633062717623bc482679f9082c4236df642b0.tar.bz2 |
* generic/tclIndexObj.c (STRING_AT): removed ptrdiff_t cast and
use of VOID* in default case (GNU-ism).
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tclIndexObj.c | 16 |
2 files changed, 7 insertions, 14 deletions
@@ -1,3 +1,8 @@ +2002-02-15 Jeff Hobbs <jeffh@ActiveState.com> + + * generic/tclIndexObj.c (STRING_AT): removed ptrdiff_t cast and + use of VOID* in default case (GNU-ism). + 2002-02-15 Kevin Kenny <kennykb@acm.org> * compat/strtoll.c: diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index eab6b96..fbddce9 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.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: tclIndexObj.c,v 1.14 2002/02/15 19:58:28 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.15 2002/02/16 00:37:54 hobbs Exp $ */ #include "tclInt.h" @@ -56,21 +56,9 @@ typedef struct { /* * The following macros greatly simplify moving through a table... - * - * SunPro CC prohibits address arithmetic on (void *) values, so - * use (char *) on that platform/build-environment instead. */ -#ifdef __sparc -# define STRING_AT(table, offset, index) \ - (*((CONST char * CONST *)(((char *)(table)) + ((offset) * (index))))) - -#elif defined (WIN32) -# define STRING_AT(table, offset, index) \ +#define STRING_AT(table, offset, index) \ (*((CONST char * CONST *)(((char *)(table)) + ((offset) * (index))))) -#else -# define STRING_AT(table, offset, index) \ - (*((CONST char * CONST *)(((VOID *)(table)) + (ptrdiff_t)((offset) * (index))))) -#endif #define NEXT_ENTRY(table, offset) \ (&(STRING_AT(table, offset, 1))) #define EXPAND_OF(indexRep) \ |