Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'mc' into mc++
[simgrid.git] / src / bindings / lua / lua_platf.c
index 777a664..aa2dc2d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010. The SimGrid Team.
+/* Copyright (c) 2010, 2012-2014. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -92,7 +92,8 @@ int console_add_host(lua_State *L) {
   // get power value
   lua_pushstring(L, "power");
   lua_gettable(L, -2);
-  host.power_peak = lua_tonumber(L, -1);
+  host.power_peak = xbt_dynar_new(sizeof(double), NULL);
+  xbt_dynar_push_as(host.power_peak, double, lua_tonumber(L, -1));
   lua_pop(L, 1);
 
   // get core
@@ -320,7 +321,6 @@ int console_AS_open(lua_State *L) {
  else if(!strcmp(mode,"Floyd")) mode_int = A_surfxml_AS_routing_Floyd;
  else if(!strcmp(mode,"Dijkstra")) mode_int = A_surfxml_AS_routing_Dijkstra;
  else if(!strcmp(mode,"DijkstraCache")) mode_int = A_surfxml_AS_routing_DijkstraCache;
- else if(!strcmp(mode,"RuleBased")) mode_int = A_surfxml_AS_routing_RuleBased;
  else if(!strcmp(mode,"Vivaldi")) mode_int = A_surfxml_AS_routing_Vivaldi;
  else if(!strcmp(mode,"Cluster")) mode_int = A_surfxml_AS_routing_Cluster;
  else if(!strcmp(mode,"none")) mode_int = A_surfxml_AS_routing_None;