summaryrefslogtreecommitdiff
path: root/rts/Printer.c
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-08-25 11:31:50 +0100
committerIan Lynagh <ian@well-typed.com>2012-08-25 11:31:50 +0100
commit8413d83859ee0120e52bb1b3cd775b7344b52c76 (patch)
tree4a4280e8065955b3e08b303fa416587990b68824 /rts/Printer.c
parent75f2e87bd7b6b8c0143addc59abfe68456e59591 (diff)
downloadhaskell-8413d83859ee0120e52bb1b3cd775b7344b52c76.tar.gz
Make a function for get_itbl, rather than using a CPP macro
This has several advantages: * It can be called from gdb * There is more type information for the user, and type checking for the compiler * Less opportunity for things to go wrong, e.g. due to missing parentheses or repeated execution The sizes of the non-debug .o files hasn't changed (other than Inlines.o), so I'm pretty sure the compiled code is identical.
Diffstat (limited to 'rts/Printer.c')
-rw-r--r--rts/Printer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/Printer.c b/rts/Printer.c
index a7ce367833..737fba4f20 100644
--- a/rts/Printer.c
+++ b/rts/Printer.c
@@ -91,7 +91,7 @@ printThunkPayload( StgThunk *obj )
StgWord i, j;
const StgInfoTable* info;
- info = get_itbl(obj);
+ info = get_itbl((StgClosure *)obj);
for (i = 0; i < info->layout.payload.ptrs; ++i) {
debugBelch(", ");
printPtr((StgPtr)obj->payload[i]);