diff options
author | Simon Marlow <marlowsd@gmail.com> | 2012-09-07 13:55:11 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2012-09-07 15:32:14 +0100 |
commit | 41737f12f99c9ea776f7658b93e5b03ffc8f120b (patch) | |
tree | 76dd200a6f0e3fd8af87270ae1010985038c26a9 /rts/Printer.c | |
parent | a8179622f84bbd52e127a9596d2d4a918ca64e0c (diff) | |
download | haskell-41737f12f99c9ea776f7658b93e5b03ffc8f120b.tar.gz |
Deprecate lnat, and use StgWord instead
lnat was originally "long unsigned int" but we were using it when we
wanted a 64-bit type on a 64-bit machine. This broke on Windows x64,
where long == int == 32 bits. Using types of unspecified size is bad,
but what we really wanted was a type with N bits on an N-bit machine.
StgWord is exactly that.
lnat was mentioned in some APIs that clients might be using
(e.g. StackOverflowHook()), so we leave it defined but with a comment
to say that it's deprecated.
Diffstat (limited to 'rts/Printer.c')
-rw-r--r-- | rts/Printer.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/rts/Printer.c b/rts/Printer.c index 156dbea37a..1b0c4b48c7 100644 --- a/rts/Printer.c +++ b/rts/Printer.c @@ -300,21 +300,21 @@ printClosure( StgClosure *obj ) StgWord i; debugBelch("ARR_WORDS(\""); for (i=0; i<arr_words_words((StgArrWords *)obj); i++) - debugBelch("%" FMT_SizeT, (lnat)((StgArrWords *)obj)->payload[i]); + debugBelch("%" FMT_SizeT, (W_)((StgArrWords *)obj)->payload[i]); debugBelch("\")\n"); break; } case MUT_ARR_PTRS_CLEAN: - debugBelch("MUT_ARR_PTRS_CLEAN(size=%" FMT_SizeT ")\n", (lnat)((StgMutArrPtrs *)obj)->ptrs); + debugBelch("MUT_ARR_PTRS_CLEAN(size=%" FMT_SizeT ")\n", (W_)((StgMutArrPtrs *)obj)->ptrs); break; case MUT_ARR_PTRS_DIRTY: - debugBelch("MUT_ARR_PTRS_DIRTY(size=%" FMT_SizeT ")\n", (lnat)((StgMutArrPtrs *)obj)->ptrs); + debugBelch("MUT_ARR_PTRS_DIRTY(size=%" FMT_SizeT ")\n", (W_)((StgMutArrPtrs *)obj)->ptrs); break; case MUT_ARR_PTRS_FROZEN: - debugBelch("MUT_ARR_PTRS_FROZEN(size=%" FMT_SizeT ")\n", (lnat)((StgMutArrPtrs *)obj)->ptrs); + debugBelch("MUT_ARR_PTRS_FROZEN(size=%" FMT_SizeT ")\n", (W_)((StgMutArrPtrs *)obj)->ptrs); break; case MVAR_CLEAN: @@ -431,7 +431,7 @@ printSmallBitmap( StgPtr spBottom, StgPtr payload, StgWord bitmap, nat size ) printPtr((P_)payload[i]); debugBelch("\n"); } else { - debugBelch("Word# %" FMT_SizeT "\n", (lnat)payload[i]); + debugBelch("Word# %" FMT_SizeT "\n", (W_)payload[i]); } } } @@ -447,12 +447,12 @@ printLargeBitmap( StgPtr spBottom, StgPtr payload, StgLargeBitmap* large_bitmap, StgWord bitmap = large_bitmap->bitmap[bmp]; j = 0; for(; i < size && j < BITS_IN(W_); j++, i++, bitmap >>= 1 ) { - debugBelch(" stk[%" FMT_SizeT "] (%p) = ", (lnat)(spBottom-(payload+i)), payload+i); + debugBelch(" stk[%" FMT_SizeT "] (%p) = ", (W_)(spBottom-(payload+i)), payload+i); if ((bitmap & 1) == 0) { printPtr((P_)payload[i]); debugBelch("\n"); } else { - debugBelch("Word# %" FMT_SizeT "\n", (lnat)payload[i]); + debugBelch("Word# %" FMT_SizeT "\n", (W_)payload[i]); } } } |