X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fe1f35a08a06923fe38c33f3299ac89e56f50998..89ad83fdc4abbd81ac53c60b9d1056ccb5486356:/src/bindings/ruby/rb_msg_host.c diff --git a/src/bindings/ruby/rb_msg_host.c b/src/bindings/ruby/rb_msg_host.c index 5320265791..64f16b49ca 100644 --- a/src/bindings/ruby/rb_msg_host.c +++ b/src/bindings/ruby/rb_msg_host.c @@ -76,6 +76,22 @@ VALUE rb_host_process(VALUE class,VALUE ruby_process) host = MSG_process_get_host(process); return Data_Wrap_Struct(class, 0, rb_host_free, host); - - -} \ No newline at end of file + +} + +// get all hosts +VALUE rb_host_get_all_hosts(VALUE class) +{ + int nb,index; + m_host_t *hosts; + VALUE rb_hosts; + nb = MSG_get_host_number(); + hosts = MSG_get_host_table(); + rb_hosts = rb_ary_new2(nb); + + for(index=0 ; index