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/RetainerProfile.h | |
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/RetainerProfile.h')
-rw-r--r-- | rts/RetainerProfile.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/RetainerProfile.h b/rts/RetainerProfile.h index d92563ffbb..180c4e24e3 100644 --- a/rts/RetainerProfile.h +++ b/rts/RetainerProfile.h @@ -33,7 +33,7 @@ extern StgWord flip; ((((StgWord)(c)->header.prof.hp.rs & 1) ^ flip) == 0) static inline RetainerSet * -retainerSetOf( StgClosure *c ) +retainerSetOf( const StgClosure *c ) { ASSERT( isRetainerSetFieldValid(c) ); // StgWord has the same size as pointers, so the following type |