[commit: ghc] master: Make `#include "Rts.h"` C++-compatible again (re #8676) (fe3740b)

git at git.haskell.org git at git.haskell.org
Sun Jan 19 13:46:04 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/fe3740bd931ca30c22d956816f71be9026eeef54/ghc

>---------------------------------------------------------------

commit fe3740bd931ca30c22d956816f71be9026eeef54
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Sun Jan 19 14:37:05 2014 +0100

    Make `#include "Rts.h"` C++-compatible again (re #8676)
    
    Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org>


>---------------------------------------------------------------

fe3740bd931ca30c22d956816f71be9026eeef54
 includes/rts/Threads.h               |    2 +-
 includes/rts/storage/Block.h         |   12 ++++++------
 includes/rts/storage/ClosureMacros.h |    4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/includes/rts/Threads.h b/includes/rts/Threads.h
index e6844a3..da6f7a4 100644
--- a/includes/rts/Threads.h
+++ b/includes/rts/Threads.h
@@ -68,6 +68,6 @@ extern Capability MainCapability;
 // Change the number of capabilities (only supports increasing the
 // current value at the moment).
 //
-extern void setNumCapabilities (nat new);
+extern void setNumCapabilities (nat new_);
 
 #endif /* RTS_THREADS_H */
diff --git a/includes/rts/storage/Block.h b/includes/rts/storage/Block.h
index 7b3bc99..5567bf4 100644
--- a/includes/rts/storage/Block.h
+++ b/includes/rts/storage/Block.h
@@ -248,17 +248,17 @@ dbl_link_insert_after(bdescr *bd, bdescr *after)
 }
 
 INLINE_HEADER void
-dbl_link_replace(bdescr *new, bdescr *old, bdescr **list)
+dbl_link_replace(bdescr *new_, bdescr *old, bdescr **list)
 {
-    new->link = old->link;
-    new->u.back = old->u.back;
+    new_->link = old->link;
+    new_->u.back = old->u.back;
     if (old->link) {
-        old->link->u.back = new;
+        old->link->u.back = new_;
     }
     if (old->u.back) {
-        old->u.back->link = new;
+        old->u.back->link = new_;
     } else {
-        *list = new;
+        *list = new_;
     }
 }
 
diff --git a/includes/rts/storage/ClosureMacros.h b/includes/rts/storage/ClosureMacros.h
index 8933e85..88434d4 100644
--- a/includes/rts/storage/ClosureMacros.h
+++ b/includes/rts/storage/ClosureMacros.h
@@ -245,12 +245,12 @@ TAG_CLOSURE(StgWord tag,StgClosure * p)
 INLINE_HEADER rtsBool LOOKS_LIKE_INFO_PTR_NOT_NULL (StgWord p)
 {
     StgInfoTable *info = INFO_PTR_TO_STRUCT((StgInfoTable *)p);
-    return info->type != INVALID_OBJECT && info->type < N_CLOSURE_TYPES;
+    return (info->type != INVALID_OBJECT && info->type < N_CLOSURE_TYPES) ? rtsTrue : rtsFalse;
 }
 
 INLINE_HEADER rtsBool LOOKS_LIKE_INFO_PTR (StgWord p)
 {
-    return p && (IS_FORWARDING_PTR(p) || LOOKS_LIKE_INFO_PTR_NOT_NULL(p));
+    return (p && (IS_FORWARDING_PTR(p) || LOOKS_LIKE_INFO_PTR_NOT_NULL(p))) ? rtsTrue : rtsFalse;
 }
 
 INLINE_HEADER rtsBool LOOKS_LIKE_CLOSURE_PTR (void *p)



More information about the ghc-commits mailing list