From f6f633062717623bc482679f9082c4236df642b0 Mon Sep 17 00:00:00 2001 From: hobbs Date: Sat, 16 Feb 2002 00:37:54 +0000 Subject: * generic/tclIndexObj.c (STRING_AT): removed ptrdiff_t cast and use of VOID* in default case (GNU-ism). --- ChangeLog | 5 +++++ generic/tclIndexObj.c | 16 ++-------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index bb3063b..4a0bb62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-02-15 Jeff Hobbs + + * generic/tclIndexObj.c (STRING_AT): removed ptrdiff_t cast and + use of VOID* in default case (GNU-ism). + 2002-02-15 Kevin Kenny * 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) \ -- cgit v0.12