From 0c039fb92a48ad87a314b902efbba3bc40539e02 Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 6 Feb 2003 10:04:57 +0000 Subject: [PATCH] [project @ 2003-02-06 10:04:57 by simonmar] Oops, Add rts_getFunPtr too. --- ghc/rts/RtsAPI.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ghc/rts/RtsAPI.c b/ghc/rts/RtsAPI.c index c84fff2..529135e 100644 --- a/ghc/rts/RtsAPI.c +++ b/ghc/rts/RtsAPI.c @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- - * $Id: RtsAPI.c,v 1.41 2003/02/06 09:56:10 simonmar Exp $ + * $Id: RtsAPI.c,v 1.42 2003/02/06 10:04:57 simonmar Exp $ * * (c) The GHC Team, 1998-2001 * @@ -357,6 +357,15 @@ rts_getPtr (HaskellObj p) return (void *)(p->payload[0]); } +HsFunPtr +rts_getFunPtr (HaskellObj p) +{ + // See comment above: + // ASSERT(p->header.info == FunPtr_con_info || + // p->header.info == FunPtr_static_info); + return (void *)(p->payload[0]); +} + #ifdef COMPILER /* GHC has em, Hugs doesn't */ HsBool rts_getBool (HaskellObj p) -- 1.7.10.4