diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2016-05-12 15:45:00 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-05-12 17:33:39 +0200 |
commit | 995cf0f356ef3a8b7a394de640a853fd6ca9c2b5 (patch) | |
tree | 54cac37b35be9896ea94e8db806a2bd5cf8ae431 /rts/sm/MBlock.c | |
parent | 69c974fef825cfc286c9cad17ed8f4e138bf84fc (diff) | |
download | haskell-995cf0f356ef3a8b7a394de640a853fd6ca9c2b5.tar.gz |
rts: Make function pointer parameters `const` where possible
If a function takes a pointer parameter and doesn't update what
the pointer points to, we can add `const` to the parameter
declaration to document that no updates occur.
Test Plan: Validate on Linux, OS X and Windows
Reviewers: austin, Phyx, bgamari, simonmar, hsyl20
Reviewed By: bgamari, simonmar, hsyl20
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2200
Diffstat (limited to 'rts/sm/MBlock.c')
-rw-r--r-- | rts/sm/MBlock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/sm/MBlock.c b/rts/sm/MBlock.c index 11b12d1c16..440b03efa7 100644 --- a/rts/sm/MBlock.c +++ b/rts/sm/MBlock.c @@ -359,7 +359,7 @@ uint32_t mblock_map_count = 0; MbcCacheLine mblock_cache[MBC_ENTRIES]; static MBlockMap * -findMBlockMap(void *p) +findMBlockMap(const void *p) { uint32_t i; StgWord32 hi = (StgWord32) (((StgWord)p) >> 32); @@ -373,7 +373,7 @@ findMBlockMap(void *p) return NULL; } -StgBool HEAP_ALLOCED_miss(StgWord mblock, void *p) +StgBool HEAP_ALLOCED_miss(StgWord mblock, const void *p) { MBlockMap *map; MBlockMapLine value; |