X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/12c0f182635ed71b370d608b5b9a614153765cd4..49e85177c669d793e84242983a1b1f430e47184e:/src/bindings/lua/lua_platf.c diff --git a/src/bindings/lua/lua_platf.c b/src/bindings/lua/lua_platf.c index 581b06de68..aa2dc2dfc7 100644 --- a/src/bindings/lua/lua_platf.c +++ b/src/bindings/lua/lua_platf.c @@ -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