A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
damn lua
[simgrid.git]
/
src
/
bindings
/
lua
/
lua_platf.cpp
diff --git
a/src/bindings/lua/lua_platf.cpp
b/src/bindings/lua/lua_platf.cpp
index
8e02217
..
f0ca438
100644
(file)
--- a/
src/bindings/lua/lua_platf.cpp
+++ b/
src/bindings/lua/lua_platf.cpp
@@
-101,18
+101,16
@@
int console_add_backbone(lua_State *L) {
}
sg_platf_new_link(&link);
}
sg_platf_new_link(&link);
- routing_cluster_add_backbone(simgrid::surf::LinkImpl::byName(link.id
.c_str()
));
+ routing_cluster_add_backbone(simgrid::surf::LinkImpl::byName(link.id));
return 0;
}
int console_add_host___link(lua_State *L) {
return 0;
}
int console_add_host___link(lua_State *L) {
- s_sg_platf_host_link_cbarg_t hostlink;
- memset(&hostlink,0,sizeof(hostlink));
+ HostLinkCreationArgs hostlink;
int type;
int type;
- lua_ensure(lua_istable(L, -1),
- "Bad Arguments to create host_link in Lua. Should be a table with named arguments.");
+ lua_ensure(lua_istable(L, -1), "Bad Arguments to create host_link in Lua. Should be a table with named arguments.");
lua_pushstring(L, "id");
type = lua_gettable(L, -2);
lua_pushstring(L, "id");
type = lua_gettable(L, -2);
@@
-134,7
+132,7
@@
int console_add_host___link(lua_State *L) {
hostlink.link_down = lua_tostring(L, -1);
lua_pop(L, 1);
hostlink.link_down = lua_tostring(L, -1);
lua_pop(L, 1);
- XBT_DEBUG("Create a host_link for host %s", hostlink.id);
+ XBT_DEBUG("Create a host_link for host %s", hostlink.id
.c_str()
);
sg_platf_new_hostlink(&hostlink);
return 0;
sg_platf_new_hostlink(&hostlink);
return 0;
@@
-284,8
+282,7
@@
int console_add_link(lua_State *L) {
* add Router to AS components
*/
int console_add_router(lua_State* L) {
* add Router to AS components
*/
int console_add_router(lua_State* L) {
- lua_ensure(lua_istable(L, -1),
- "Bad Arguments to create router, Should be a table with named arguments");
+ lua_ensure(lua_istable(L, -1), "Bad Arguments to create router, Should be a table with named arguments");
lua_pushstring(L, "id");
int type = lua_gettable(L, -2);
lua_pushstring(L, "id");
int type = lua_gettable(L, -2);
@@
-342,7
+339,7
@@
int console_add_route(lua_State *L) {
// Several names separated by , \t\r\n
for (auto name : names) {
if (name.length() > 0) {
// Several names separated by , \t\r\n
for (auto name : names) {
if (name.length() > 0) {
- simgrid::surf::LinkImpl* link = simgrid::surf::LinkImpl::byName(name
.c_str()
);
+ simgrid::surf::LinkImpl* link = simgrid::surf::LinkImpl::byName(name);
route.link_list->push_back(link);
}
}
route.link_list->push_back(link);
}
}
@@
-423,7
+420,7
@@
int console_add_ASroute(lua_State *L) {
// Several names separated by , \t\r\n
for (auto name : names) {
if (name.length() > 0) {
// Several names separated by , \t\r\n
for (auto name : names) {
if (name.length() > 0) {
- simgrid::surf::LinkImpl* link = simgrid::surf::LinkImpl::byName(name
.c_str()
);
+ simgrid::surf::LinkImpl* link = simgrid::surf::LinkImpl::byName(name);
ASroute.link_list->push_back(link);
}
}
ASroute.link_list->push_back(link);
}
}
@@
-483,10
+480,10
@@
int console_AS_open(lua_State *L) {
mode_int = A_surfxml_AS_routing_None;
else xbt_die("Don't have the model name '%s'",mode);
mode_int = A_surfxml_AS_routing_None;
else xbt_die("Don't have the model name '%s'",mode);
-
s_sg_platf_AS_cbarg_t
AS;
+
ZoneCreationArgs
AS;
AS.id = id;
AS.routing = mode_int;
AS.id = id;
AS.routing = mode_int;
- simgrid::s4u::NetZone* new_as = sg_platf_new_
AS
_begin(&AS);
+ simgrid::s4u::NetZone* new_as = sg_platf_new_
Zone
_begin(&AS);
/* Build a Lua representation of the new AS on the stack */
lua_newtable(L);
/* Build a Lua representation of the new AS on the stack */
lua_newtable(L);
@@
-501,7
+498,7
@@
int console_AS_open(lua_State *L) {
}
int console_AS_seal(lua_State *L) {
XBT_DEBUG("Sealing AS");
}
int console_AS_seal(lua_State *L) {
XBT_DEBUG("Sealing AS");
- sg_platf_new_
AS
_seal();
+ sg_platf_new_
Zone
_seal();
return 0;
}
return 0;
}