From bd73cb55f04d76ebf58e39840961f3074bebd9c9 Mon Sep 17 00:00:00 2001
From: simonmar <unknown>
Date: Tue, 3 Aug 1999 15:44:21 +0000
Subject: [PATCH] [project @ 1999-08-03 15:44:21 by simonmar] minor cleanup:
 use INFO_PTR_TO_STRUCT in get_itbl() and hence pull it out of the #ifdef
 TABLES_NEXT_TO_CODE.

---
 ghc/includes/ClosureMacros.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ghc/includes/ClosureMacros.h b/ghc/includes/ClosureMacros.h
index 07dfa09a572f..f7895ee4fd17 100644
--- a/ghc/includes/ClosureMacros.h
+++ b/ghc/includes/ClosureMacros.h
@@ -1,5 +1,5 @@
 /* ----------------------------------------------------------------------------
- * $Id: ClosureMacros.h,v 1.18 1999/07/06 16:17:39 sewardj Exp $
+ * $Id: ClosureMacros.h,v 1.19 1999/08/03 15:44:21 simonmar Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
@@ -65,7 +65,6 @@
 #define GET_ENTRY(c)     ((StgFunPtr)((c)->header.info))
 #define ENTRY_CODE(info) (info)
 #define INFO_PTR_TO_STRUCT(info) ((StgInfoTable *)(info) - 1)
-#define get_itbl(c)      (((c)->header.info) - 1)
 static __inline__ StgFunPtr get_entry(const StgInfoTable *itbl) {
     return (StgFunPtr)(itbl+1);
 }
@@ -74,12 +73,13 @@ static __inline__ StgFunPtr get_entry(const StgInfoTable *itbl) {
 #define GET_ENTRY(c)     ((c)->header.info->entry)
 #define ENTRY_CODE(info) (((StgInfoTable *)info)->entry)
 #define INFO_PTR_TO_STRUCT(info) ((StgInfoTable *)info)
-#define get_itbl(c)      ((c)->header.info)
 static __inline__ StgFunPtr get_entry(const StgInfoTable *itbl) {
     return itbl->entry;
 }
 #endif
 
+#define get_itbl(c)      (INFO_PTR_TO_STRUCT((c)->header.info))
+
 /* -----------------------------------------------------------------------------
    Macros for distinguishing data pointers from code pointers
    -------------------------------------------------------------------------- */
-- 
GitLab