[commit: ghc] master: rts: Remove deprecated C type `lnat` (868d2c4)

git at git.haskell.org git at git.haskell.org
Sun May 1 20:12:12 UTC 2016


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

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

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

commit 868d2c473d6faeb23d8626fd21fa342e29b582f4
Author: Erik de Castro Lopo <erikd at mega-nerd.com>
Date:   Sun May 1 21:59:50 2016 +1000

    rts: Remove deprecated C type `lnat`
    
    Summary:
    The `lnat` type was deprecated in 2012 in commit 41737f12f9 with
    a note to use `StgWord` instead.
    
    Test Plan: Validate on Linux and OS X
    
    Reviewers: simonmar, austin, Phyx, hvr, bgamari
    
    Reviewed By: simonmar, Phyx, bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2164


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

868d2c473d6faeb23d8626fd21fa342e29b582f4
 includes/rts/Types.h                  | 3 ---
 testsuite/tests/rts/testblockalloc.c  | 2 +-
 testsuite/tests/rts/testheapalloced.c | 2 +-
 testsuite/tests/rts/testmblockalloc.c | 2 +-
 4 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/includes/rts/Types.h b/includes/rts/Types.h
index 88d0b34..1791b88 100644
--- a/includes/rts/Types.h
+++ b/includes/rts/Types.h
@@ -18,9 +18,6 @@
 
 typedef unsigned int     nat;           /* at least 32 bits (like int) */
 
-// Deprecated; just use StgWord instead
-typedef StgWord lnat;
-
 /* ullong (64|128-bit) type: only include if needed (not ANSI) */
 #if defined(__GNUC__) 
 #define LL(x) (x##LL)
diff --git a/testsuite/tests/rts/testblockalloc.c b/testsuite/tests/rts/testblockalloc.c
index b49ae00..bde81d3 100644
--- a/testsuite/tests/rts/testblockalloc.c
+++ b/testsuite/tests/rts/testblockalloc.c
@@ -11,7 +11,7 @@ const int MAXALLOC = ((8 * 1024 * 1024) / BLOCK_SIZE - 1);
 //const int MAXALLOC = ((64 * 1024 * 1024) / BLOCK_SIZE - 1);
 const int SEED     = 0xf00f00;
 
-extern lnat mblocks_allocated;
+extern StgWord mblocks_allocated;
 
 int main (int argc, char *argv[])
 {
diff --git a/testsuite/tests/rts/testheapalloced.c b/testsuite/tests/rts/testheapalloced.c
index 3d8fa05..e827ae2 100644
--- a/testsuite/tests/rts/testheapalloced.c
+++ b/testsuite/tests/rts/testheapalloced.c
@@ -21,7 +21,7 @@ const int MAXALLOC = ((8 * 1024 * 1024) / BLOCK_SIZE - 1);
 //const int MAXALLOC = ((4 * 1024 * 1024) / BLOCK_SIZE - 1);
 const int SEED     = 0xf00f00;
 
-extern lnat mblocks_allocated;
+extern StgWord mblocks_allocated;
 
 int main (int argc, char *argv[])
 {
diff --git a/testsuite/tests/rts/testmblockalloc.c b/testsuite/tests/rts/testmblockalloc.c
index df03658..cbfd050 100644
--- a/testsuite/tests/rts/testmblockalloc.c
+++ b/testsuite/tests/rts/testmblockalloc.c
@@ -9,7 +9,7 @@ const int ARRSIZE  = 64;
 const int LOOPS    = 1000;
 const int SEED     = 0xf00f00;
 
-extern lnat mblocks_allocated;
+extern StgWord mblocks_allocated;
 
 int main (int argc, char *argv[])
 {



More information about the ghc-commits mailing list