Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
various little cleanups
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 4 Mar 2010 14:45:00 +0000 (14:45 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 4 Mar 2010 14:45:00 +0000 (14:45 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7186 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/bindings/ruby/rb_application_handler.c
src/bindings/ruby/simgrid_ruby.c

index a54d6fe..66d46d9 100644 (file)
@@ -30,15 +30,17 @@ static void rb_process_create_with_args(VALUE fct_name,VALUE arguments,VALUE pro
   m_process_t process; // Native Process to Create
   const char * name ; // Name of C Native Processs
 
   m_process_t process; // Native Process to Create
   const char * name ; // Name of C Native Processs
 
+
   if(!fct_name)
     rb_raise(rb_eRuntimeError,"Internal error: Process name cannot be NULL");
   if(!fct_name)
     rb_raise(rb_eRuntimeError,"Internal error: Process name cannot be NULL");
+  name = RSTRING(fct_name)->ptr;
+  DEBUG1("Create native process %s",name);
 
   // Allocate the data for the simulation
   process = xbt_new0(s_m_process_t,1);
   process->simdata = xbt_new0(s_simdata_process_t,1);
   // Bind The Ruby Process instance to The Native Process
   rb_process_bind(ruby_process,process);
 
   // Allocate the data for the simulation
   process = xbt_new0(s_m_process_t,1);
   process->simdata = xbt_new0(s_simdata_process_t,1);
   // Bind The Ruby Process instance to The Native Process
   rb_process_bind(ruby_process,process);
-  name = RSTRING(fct_name)->ptr;
   process->name = xbt_strdup(name);
   // Host
   m_host_t host = MSG_get_host_by_name(RSTRING(ht_name)->ptr);
   process->name = xbt_strdup(name);
   // Host
   m_host_t host = MSG_get_host_by_name(RSTRING(ht_name)->ptr);
index 8bd78e6..393fec7 100644 (file)
@@ -138,6 +138,7 @@ static VALUE msg_get_clock(VALUE class) {
 // Ruby intropspection : Instanciate a ruby Class From its Name
 // Used by ProcessFactory::createProcess
 
 // Ruby intropspection : Instanciate a ruby Class From its Name
 // Used by ProcessFactory::createProcess
 
+// FIXME: KILLME?
 static VALUE msg_new_ruby_instance(VALUE class,VALUE className) {
   ruby_init();
   ruby_init_loadpath();
 static VALUE msg_new_ruby_instance(VALUE class,VALUE className) {
   ruby_init();
   ruby_init_loadpath();
@@ -146,7 +147,7 @@ static VALUE msg_new_ruby_instance(VALUE class,VALUE className) {
   return rb_funcall3(rb_const_get(rb_cObject, rb_intern(p_className)),rb_intern("new"),0, 0);
 }
 
   return rb_funcall3(rb_const_get(rb_cObject, rb_intern(p_className)),rb_intern("new"),0, 0);
 }
 
-//This Time With Args
+//This Time With Args FIXME: KILLME
 static VALUE msg_new_ruby_instance_with_args(VALUE class,VALUE className,VALUE args) {
   ruby_init();
   ruby_init_loadpath();
 static VALUE msg_new_ruby_instance_with_args(VALUE class,VALUE className,VALUE args) {
   ruby_init();
   ruby_init_loadpath();