git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7186
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
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);
// 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
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();
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 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();