Commit ed6e7225 authored by simonmar's avatar simonmar

[project @ 2002-09-05 08:58:55 by simonmar]

Remove RtsAPIDeprec.c, since this is causing grief.  The upshot (I
think) is that you won't be able to do foreign import "wrapper" with
an Addr in the type.
parent 2ae921ed
/* ----------------------------------------------------------------------------
* $Id: RtsAPI.h,v 1.29 2002/07/16 10:58:16 simonmar Exp $
* $Id: RtsAPI.h,v 1.30 2002/09/05 08:58:55 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
......@@ -61,9 +61,6 @@ HaskellObj rts_mkString ( char *s );
HaskellObj rts_apply ( HaskellObj, HaskellObj );
/* DEPRECATED (use rts_mkPtr): */
HaskellObj rts_mkAddr ( HsAddr a );
/* ----------------------------------------------------------------------------
Deconstructing Haskell objects
------------------------------------------------------------------------- */
......@@ -84,9 +81,6 @@ HsDouble rts_getDouble ( HaskellObj );
HsStablePtr rts_getStablePtr ( HaskellObj );
HsBool rts_getBool ( HaskellObj );
/* DEPRECATED (use rts_getPtr): */
HsAddr rts_getAddr ( HaskellObj );
/* ----------------------------------------------------------------------------
Evaluating Haskell expressions
......
/* -----------------------------------------------------------------------------
* $Id: Linker.c,v 1.101 2002/08/16 13:29:06 simonmar Exp $
* $Id: Linker.c,v 1.102 2002/09/05 08:58:56 simonmar Exp $
*
* (c) The GHC Team, 2000, 2001
*
......@@ -407,7 +407,6 @@ typedef struct _RtsSymbolVal {
SymX(rts_evalIO) \
SymX(rts_evalLazyIO) \
SymX(rts_eval_) \
SymX(rts_getAddr) \
SymX(rts_getBool) \
SymX(rts_getChar) \
SymX(rts_getDouble) \
......@@ -419,7 +418,6 @@ typedef struct _RtsSymbolVal {
SymX(rts_getThreadId) \
SymX(rts_getWord) \
SymX(rts_getWord32) \
SymX(rts_mkAddr) \
SymX(rts_mkBool) \
SymX(rts_mkChar) \
SymX(rts_mkDouble) \
......
/* ----------------------------------------------------------------------------
* $Id: RtsAPIDeprec.c,v 1.3 2001/11/14 16:34:22 simonmar Exp $
*
* (c) The GHC Team, 1998-2001
*
* RTS API functions that are deprecated
*
* --------------------------------------------------------------------------*/
#include "PosixSource.h"
#include "Rts.h"
#include "RtsUtils.h"
#include "Storage.h"
#include "Prelude.h"
HaskellObj
rts_mkAddr (HsAddr a)
{
StgClosure *p = (StgClosure *)allocate(sizeofW(StgHeader)+1);
SET_HDR(p, Azh_con_info, CCS_SYSTEM);
p->payload[0] = (StgClosure *)a;
return p;
}
HsAddr
rts_getAddr (HaskellObj p)
{
if ( p->header.info == Azh_con_info ||
p->header.info == Azh_static_info ) {
return (void *)(p->payload[0]);
} else {
barf("getAddr: not an Addr");
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment