From 907e0ad42ebe9ac4074648201519ecc10d1f8812 Mon Sep 17 00:00:00 2001 From: mquinson Date: Sat, 27 Nov 2010 17:42:50 +0000 Subject: [PATCH] let the decoupling of main lib and bindings work in supernovae (were multiple definitions of typedef) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8695 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/bindings/ruby/simgrid_ruby.c | 6 +----- src/java/jmsg.c | 3 --- src/simix/smx_context.c | 3 +-- src/simix/smx_context_private.h | 3 +++ 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/bindings/ruby/simgrid_ruby.c b/src/bindings/ruby/simgrid_ruby.c index f77f534bc9..f6bccc573b 100644 --- a/src/bindings/ruby/simgrid_ruby.c +++ b/src/bindings/ruby/simgrid_ruby.c @@ -8,6 +8,7 @@ #include "xbt.h" #include "bindings/ruby_bindings.h" +#include "simix/smx_context_private.h" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ruby); @@ -148,11 +149,6 @@ static VALUE msg_get_clock(VALUE class) } -/*Hack: let msg load directly the right factory */ -typedef void (*SIMIX_ctx_factory_initializer_t)(smx_context_factory_t *); -extern SIMIX_ctx_factory_initializer_t factory_initializer_to_use; - - typedef VALUE(*rb_meth) (ANYARGS); void Init_libsimgrid() { diff --git a/src/java/jmsg.c b/src/java/jmsg.c index b44b39ff43..57367ff560 100644 --- a/src/java/jmsg.c +++ b/src/java/jmsg.c @@ -803,9 +803,6 @@ Java_simgrid_msg_Msg_getClock(JNIEnv * env, jclass cls) return (jdouble) MSG_get_clock(); } -/*Hack: let msg load directly the right factory */ -typedef void (*SIMIX_ctx_factory_initializer_t)(smx_context_factory_t *); -extern SIMIX_ctx_factory_initializer_t factory_initializer_to_use; JNIEXPORT void JNICALL Java_simgrid_msg_Msg_init(JNIEnv * env, jclass cls, jobjectArray jargs) diff --git a/src/simix/smx_context.c b/src/simix/smx_context.c index c6b9a39633..281c2d886f 100644 --- a/src/simix/smx_context.c +++ b/src/simix/smx_context.c @@ -10,12 +10,11 @@ #include "xbt/log.h" #include "xbt/swag.h" #include "private.h" +#include "simix/smx_context_private.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_context, simix, "Context switching mecanism"); -const char *xbt_ctx_factory_to_use = NULL; -typedef void (*SIMIX_ctx_factory_initializer_t)(smx_context_factory_t *); SIMIX_ctx_factory_initializer_t factory_initializer_to_use = NULL; /** diff --git a/src/simix/smx_context_private.h b/src/simix/smx_context_private.h index 3258b250e0..cce495c403 100644 --- a/src/simix/smx_context_private.h +++ b/src/simix/smx_context_private.h @@ -13,6 +13,9 @@ #include "simix/private.h" SG_BEGIN_DECL() +/*Hack: let msg load directly the right factory */ +typedef void (*SIMIX_ctx_factory_initializer_t)(smx_context_factory_t *); +extern SIMIX_ctx_factory_initializer_t factory_initializer_to_use; /* *********************** */ /* Context type definition */ -- 2.20.1