From: Martin Quinson Date: Mon, 6 Mar 2017 22:17:30 +0000 (+0100) Subject: fix lua builds X-Git-Tag: v3_15~212^2~7 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/3f8dfa54581750e47851e7502d180425c6a65d48 fix lua builds --- diff --git a/src/bindings/lua/lua_platf.cpp b/src/bindings/lua/lua_platf.cpp index 5a72c1cfca..dea2bab15a 100644 --- a/src/bindings/lua/lua_platf.cpp +++ b/src/bindings/lua/lua_platf.cpp @@ -335,7 +335,8 @@ int console_add_route(lua_State *L) { "Attribute 'links' must be specified for any route and must be a string (different links separated by commas or single spaces."); route.link_list = new std::vector(); std::vector names; - boost::split(names, lua_tostring(L, -1), boost::is_any_of(", \t\r\n")); + const char* str = lua_tostring(L, -1); + boost::split(names, str, boost::is_any_of(", \t\r\n")); if (names.empty()) { /* unique name */ route.link_list->push_back(simgrid::surf::LinkImpl::byName(lua_tostring(L, -1))); @@ -415,7 +416,8 @@ int console_add_ASroute(lua_State *L) { lua_gettable(L,-2); ASroute.link_list = new std::vector(); std::vector names; - boost::split(names, lua_tostring(L, -1), boost::is_any_of(", \t\r\n")); + const char* str = lua_tostring(L, -1); + boost::split(names, str, boost::is_any_of(", \t\r\n")); if (names.empty()) { /* unique name with no comma */ ASroute.link_list->push_back(simgrid::surf::LinkImpl::byName(lua_tostring(L, -1)));