From: Duncan C. <dun...@wo...> - 2006-04-25 17:08:56
|
Tue Apr 25 10:03:38 PDT 2006 Duncan Coutts <du...@co...> * #ifdef stuff to support the C FFI API of both ghc-6.4 and 6.5+ hunk ./glib/System/Glib/hsgclosure.c 43 -#define rts_unlock() +#define rts_unlock(x) +#endif + +#if __GLASGOW_HASKELL__>604 +#define GHC_RTS_USES_CAPABILITY +#define CAP cap, +#else +#define CAP hunk ./glib/System/Glib/hsgclosure.c 76 +#ifdef GHC_RTS_USES_CAPABILITY +static HaskellObj gtk2hs_value_as_haskellobj(Capability *cap, const GValue *value); +#else hunk ./glib/System/Glib/hsgclosure.c 80 +#endif hunk ./glib/System/Glib/hsgclosure.c 96 - SchedulerStatus rc; +#ifdef GHC_RTS_USES_CAPABILITY + Capability *cap; +#else + SchedulerStatus cap; +#endif hunk ./glib/System/Glib/hsgclosure.c 104 +#ifdef GHC_RTS_USES_CAPABILITY + cap = rts_lock(); +#else hunk ./glib/System/Glib/hsgclosure.c 108 +#endif hunk ./glib/System/Glib/hsgclosure.c 118 - call = rts_apply(call, gtk2hs_value_as_haskellobj(¶m_values[i])); + call = rts_apply(CAP call, gtk2hs_value_as_haskellobj(CAP ¶m_values[i])); hunk ./glib/System/Glib/hsgclosure.c 124 - rc=rts_evalIO(rts_apply((HaskellObj)runIO_closure, call),&ret); + cap=rts_evalIO(CAP rts_apply(CAP (HaskellObj)runIO_closure, call),&ret); hunk ./glib/System/Glib/hsgclosure.c 131 - rts_checkSchedStatus("gtk2hs_closure_marshal", rc); + rts_checkSchedStatus("gtk2hs_closure_marshal", cap); hunk ./glib/System/Glib/hsgclosure.c 140 - rts_unlock(); + rts_unlock(CAP); hunk ./glib/System/Glib/hsgclosure.c 165 +#ifdef GHC_RTS_USES_CAPABILITY +gtk2hs_value_as_haskellobj(Capability *cap, const GValue *value) { +#else hunk ./glib/System/Glib/hsgclosure.c 169 +#endif hunk ./glib/System/Glib/hsgclosure.c 173 - return rts_mkPtr(g_value_get_object(value)); + return rts_mkPtr(CAP g_value_get_object(value)); hunk ./glib/System/Glib/hsgclosure.c 177 - return rts_mkChar(g_value_get_char(value)); + return rts_mkChar(CAP g_value_get_char(value)); hunk ./glib/System/Glib/hsgclosure.c 179 - return rts_mkChar(g_value_get_uchar(value)); + return rts_mkChar(CAP g_value_get_uchar(value)); hunk ./glib/System/Glib/hsgclosure.c 181 - return rts_mkBool(g_value_get_boolean(value)); + return rts_mkBool(CAP g_value_get_boolean(value)); hunk ./glib/System/Glib/hsgclosure.c 183 - return rts_mkInt(g_value_get_int(value)); + return rts_mkInt(CAP g_value_get_int(value)); hunk ./glib/System/Glib/hsgclosure.c 185 - return rts_mkWord(g_value_get_uint(value)); + return rts_mkWord(CAP g_value_get_uint(value)); hunk ./glib/System/Glib/hsgclosure.c 187 - return rts_mkInt(g_value_get_long(value)); + return rts_mkInt(CAP g_value_get_long(value)); hunk ./glib/System/Glib/hsgclosure.c 189 - return rts_mkWord(g_value_get_ulong(value)); + return rts_mkWord(CAP g_value_get_ulong(value)); hunk ./glib/System/Glib/hsgclosure.c 191 - return rts_mkInt64(g_value_get_int64(value)); + return rts_mkInt64(CAP g_value_get_int64(value)); hunk ./glib/System/Glib/hsgclosure.c 193 - return rts_mkWord64(g_value_get_uint64(value)); */ + return rts_mkWord64(CAP g_value_get_uint64(value)); */ hunk ./glib/System/Glib/hsgclosure.c 195 - return rts_mkInt(g_value_get_enum(value)); + return rts_mkInt(CAP g_value_get_enum(value)); hunk ./glib/System/Glib/hsgclosure.c 197 - return rts_mkWord(g_value_get_enum(value)); + return rts_mkWord(CAP g_value_get_enum(value)); hunk ./glib/System/Glib/hsgclosure.c 199 - return rts_mkFloat(g_value_get_float(value)); + return rts_mkFloat(CAP g_value_get_float(value)); hunk ./glib/System/Glib/hsgclosure.c 201 - return rts_mkDouble(g_value_get_double(value)); + return rts_mkDouble(CAP g_value_get_double(value)); hunk ./glib/System/Glib/hsgclosure.c 203 - return rts_mkPtr((char *)g_value_get_string(value)); /* CHECKME: is the string freed? */ + return rts_mkPtr(CAP (char *)g_value_get_string(value)); /* CHECKME: is the string freed? */ hunk ./glib/System/Glib/hsgclosure.c 205 - return rts_mkPtr(g_value_get_pointer(value)); + return rts_mkPtr(CAP g_value_get_pointer(value)); hunk ./glib/System/Glib/hsgclosure.c 207 - return rts_mkPtr(g_value_get_boxed(value)); + return rts_mkPtr(CAP g_value_get_boxed(value)); hunk ./glib/System/Glib/hsgclosure.c 211 - return rts_mkPtr(g_value_get_object(value)); + return rts_mkPtr(CAP g_value_get_object(value)); |