X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FStable.h;h=fefdba966577b5a50d55f87379ae6d13340cb8f0;hb=99655406c82829dfc9663fc545a0e134c49fb79f;hp=386087e351c5d1b7eba9aeb6ccb95977001d19b8;hpb=95371b03d1e5310f3b344cc2ecf29982e2bc9f5d;p=ghc-hetmet.git diff --git a/ghc/includes/Stable.h b/ghc/includes/Stable.h index 386087e..fefdba9 100644 --- a/ghc/includes/Stable.h +++ b/ghc/includes/Stable.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Stable.h,v 1.13 2002/08/16 13:29:05 simonmar Exp $ + * $Id: Stable.h,v 1.15 2003/11/12 17:27:03 sof Exp $ * * (c) The GHC Team, 1998-2000 * @@ -41,15 +41,18 @@ extern DLL_IMPORT_RTS snEntry *stable_ptr_table; extern void freeStablePtr(StgStablePtr sp); -extern inline StgPtr -deRefStablePtr(StgStablePtr sp) +#if defined(__GNUC__) +# ifndef RTS_STABLE_C +extern inline +# endif +StgPtr deRefStablePtr(StgStablePtr sp) { ASSERT(stable_ptr_table[(StgWord)sp].ref > 0); return stable_ptr_table[(StgWord)sp].addr; } - -/* No deRefStableName, because the existence of a stable name doesn't - * guarantee the existence of the object itself. - */ +#else +/* No support for 'extern inline' */ +extern StgPtr deRefStablePtr(StgStablePtr sp); +#endif #endif