Index: generic/tclExecute.c
===================================================================
--- generic/tclExecute.c
+++ generic/tclExecute.c
@@ -333,11 +333,11 @@
 
 #define OBJ_UNDER_TOS	*(tosPtr-1)
 
 #define OBJ_AT_DEPTH(n)	*(tosPtr-(n))
 
-#define CURR_DEPTH	((unsigned long) (tosPtr - initTosPtr))
+#define CURR_DEPTH	((ptrdiff_t) (tosPtr - initTosPtr))
 
 /*
  * Macros used to trace instruction execution. The macros TRACE,
  * TRACE_WITH_OBJ, and O2S are only used inside TclNRExecuteByteCode. O2S is
  * only used in TRACE* calls to get a string from an object.

