summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-03-26 20:08:50 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-03-26 20:08:50 (GMT)
commit7d09862213dc5b81ab51ab699129f8dc0add0693 (patch)
treed14af382e18467566d4258f846b4b551a3192987 /generic/tclExecute.c
parentbf423bcae3ba7be2e916498f9f50ebb1e903d13a (diff)
downloadtcl-7d09862213dc5b81ab51ab699129f8dc0add0693.zip
tcl-7d09862213dc5b81ab51ab699129f8dc0add0693.tar.gz
tcl-7d09862213dc5b81ab51ab699129f8dc0add0693.tar.bz2
merge updates from HEAD
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index ff308f0..3f1f445 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -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: tclExecute.c,v 1.285.2.31 2008/03/10 19:33:12 dgp Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.285.2.32 2008/03/26 20:08:56 dgp Exp $
*/
#include "tclInt.h"
@@ -860,19 +860,11 @@ TclFinalizeExecution(void)
static inline int
OFFSET(
- Tcl_Obj **markerPtr)
+ void *ptr)
{
- /*
- * Note that we are only interested in the low bits of the address, so
- * that the fact that PTR2INT may lose the high bits is irrelevant.
- */
-
- int mask, base, new;
-
- mask = WALLOCALIGN-1;
- base = (PTR2INT(markerPtr) & mask);
- new = ((base + 1) + mask) & ~mask;
- return (new - base);
+ int mask = TCL_ALLOCALIGN-1;
+ int base = PTR2INT(ptr) & mask;
+ return (TCL_ALLOCALIGN - base)/sizeof(Tcl_Obj**);
}
#define MEMSTART(markerPtr) \