From: simonmar Date: Fri, 9 Feb 2001 12:09:33 +0000 (+0000) Subject: [project @ 2001-02-09 12:09:33 by simonmar] X-Git-Tag: Approximately_9120_patches~2702 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=a70434c52d6259b83c132c116539178e4a8874f1;p=ghc-hetmet.git [project @ 2001-02-09 12:09:33 by simonmar] Declare the 3rd argument to startupHaskell as a function pointer rather than a void *, to avoid accidental mis-declarations of __init_Foo symbols. --- diff --git a/ghc/includes/RtsAPI.h b/ghc/includes/RtsAPI.h index 8baf34f..6b249a8 100644 --- a/ghc/includes/RtsAPI.h +++ b/ghc/includes/RtsAPI.h @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- - * $Id: RtsAPI.h,v 1.19 2001/01/11 17:25:56 simonmar Exp $ + * $Id: RtsAPI.h,v 1.20 2001/02/09 12:09:33 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -28,7 +28,8 @@ typedef StgClosure *HaskellObj; /* ---------------------------------------------------------------------------- Starting up and shutting down the Haskell RTS. ------------------------------------------------------------------------- */ -extern void startupHaskell ( int argc, char *argv[], void *init_root ); +extern void startupHaskell ( int argc, char *argv[], + void (*init_root)(void) ); extern void shutdownHaskell ( void ); extern void shutdownHaskellAndExit ( int exitCode ); extern void setProgArgv ( int argc, char *argv[] ); diff --git a/ghc/rts/RtsStartup.c b/ghc/rts/RtsStartup.c index af3d86f..9bdc155 100644 --- a/ghc/rts/RtsStartup.c +++ b/ghc/rts/RtsStartup.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsStartup.c,v 1.46 2000/12/19 14:30:58 simonmar Exp $ + * $Id: RtsStartup.c,v 1.47 2001/02/09 12:09:33 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -59,7 +59,7 @@ static ullong startTime = 0; #endif EXTFUN(__init_Prelude); -static void initModules ( void * ); +static void initModules ( void (*)(void) ); void setProgArgv(int argc, char *argv[]) @@ -82,7 +82,7 @@ getProgArgv(int *argc, char **argv[]) void -startupHaskell(int argc, char *argv[], void *init_root) +startupHaskell(int argc, char *argv[], void (*init_root)(void)) { /* To avoid repeated initialisations of the RTS */ if (rts_has_started_up) @@ -244,7 +244,7 @@ nat init_sp = 0; #ifndef INTERPRETER static void -initModules ( void *init_root ) +initModules ( void (*init_root)(void) ) { #ifdef SMP Capability cap;