From fd01384ae2cbfe69fe80b99a1c0faa9c2ec84a37 Mon Sep 17 00:00:00 2001 From: mquinson Date: Thu, 4 Mar 2010 14:45:00 +0000 Subject: [PATCH] various little cleanups 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 | 4 +++- src/bindings/ruby/simgrid_ruby.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bindings/ruby/rb_application_handler.c b/src/bindings/ruby/rb_application_handler.c index a54d6fe873..66d46d90bf 100644 --- a/src/bindings/ruby/rb_application_handler.c +++ b/src/bindings/ruby/rb_application_handler.c @@ -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 + 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); - name = RSTRING(fct_name)->ptr; process->name = xbt_strdup(name); // Host m_host_t host = MSG_get_host_by_name(RSTRING(ht_name)->ptr); diff --git a/src/bindings/ruby/simgrid_ruby.c b/src/bindings/ruby/simgrid_ruby.c index 8bd78e6dbb..393fec7715 100644 --- a/src/bindings/ruby/simgrid_ruby.c +++ b/src/bindings/ruby/simgrid_ruby.c @@ -138,6 +138,7 @@ static VALUE msg_get_clock(VALUE class) { // 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(); @@ -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); } -//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(); -- 2.20.1