From b0707481eb8ab87f2459b5e6eb508d22001a3353 Mon Sep 17 00:00:00 2001 From: japhie Date: Thu, 23 Jun 2005 21:53:48 +0000 Subject: [PATCH] - Let GC know when we want to use threads - Explicit pointer cast to stop gcc warning --- src/c/alloc_2.d | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/c/alloc_2.d b/src/c/alloc_2.d index 05e0e03f8..b996c7900 100644 --- a/src/c/alloc_2.d +++ b/src/c/alloc_2.d @@ -18,6 +18,9 @@ #include "ecl.h" #include "internal.h" #include "page.h" +#ifdef ECL_THREADS +#define GC_THREADS +#endif #ifdef _MSC_VER #include "gc.h" #include "private/gc_priv.h" @@ -256,8 +259,8 @@ ecl_mark_env(struct cl_env_struct *env) /*memset(env->values[env->nvalues], 0, (64-env->nvalues)*sizeof(cl_object));*/ #ifdef ECL_THREADS /* When using threads, "env" is a pointer to memory allocated by ECL. */ - GC_push_conditional(env, env + 1, 1); - GC_set_mark_bit(env); + GC_push_conditional((void *)env, (void *)(env + 1), 1); + GC_set_mark_bit((void *)env); #else /* When not using threads, "env" is a statically allocated structure. */ GC_push_all((ptr_t)env, (ptr_t)(env + 1));