summaryrefslogtreecommitdiff
path: root/rts/hooks
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2016-05-02 21:20:28 +1000
committerErik de Castro Lopo <erikd@mega-nerd.com>2016-05-11 22:06:05 +1000
commit584ade67630f4e5c599c8422801e93f352b9a6df (patch)
tree195c0e8c49701015d1cd5f4b6092eff00774bac5 /rts/hooks
parent8669c48d06ca260c13740e0bda97beea52d332fb (diff)
downloadhaskell-584ade67630f4e5c599c8422801e93f352b9a6df.tar.gz
RtsFlags: Make `mallocFailHook` const correct
Test Plan: Validate Reviewers: hvr, austin, bgamari, simonmar Reviewed By: bgamari, simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2193
Diffstat (limited to 'rts/hooks')
-rw-r--r--rts/hooks/Hooks.h2
-rw-r--r--rts/hooks/MallocFail.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/rts/hooks/Hooks.h b/rts/hooks/Hooks.h
index 35a6011aaa..1383ccdb0f 100644
--- a/rts/hooks/Hooks.h
+++ b/rts/hooks/Hooks.h
@@ -21,7 +21,7 @@ extern char *ghc_rts_opts;
extern void OnExitHook (void);
extern void StackOverflowHook (W_ stack_size);
extern void OutOfHeapHook (W_ request_size, W_ heap_size);
-extern void MallocFailHook (W_ request_size /* in bytes */, char *msg);
+extern void MallocFailHook (W_ request_size /* in bytes */, const char *msg);
extern void FlagDefaultsHook (void);
#include "EndPrivate.h"
diff --git a/rts/hooks/MallocFail.c b/rts/hooks/MallocFail.c
index 63343a770c..42606b6f34 100644
--- a/rts/hooks/MallocFail.c
+++ b/rts/hooks/MallocFail.c
@@ -11,7 +11,7 @@
#include <stdio.h>
void
-MallocFailHook (W_ request_size /* in bytes */, char *msg)
+MallocFailHook (W_ request_size /* in bytes */, const char *msg)
{
fprintf(stderr, "malloc: failed on request for %" FMT_Word " bytes; message: %s\n", request_size, msg);
}