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
[Lua] Fixed compilation issue
[simgrid.git]
/
src
/
bindings
/
lua
/
lua_process.c
diff --git
a/src/bindings/lua/lua_process.c
b/src/bindings/lua/lua_process.c
index
4ce814f
..
ffbcf36
100644
(file)
--- a/
src/bindings/lua/lua_process.c
+++ b/
src/bindings/lua/lua_process.c
@@
-45,7
+45,7
@@
static int l_process_sleep(lua_State* L)
}
}
}
}
-static const luaL_
r
eg process_functions[] = {
+static const luaL_
R
eg process_functions[] = {
{"sleep", l_process_sleep},
/* TODO: self, create, kill, suspend, is_suspended, resume, get_name,
* get_pid, get_ppid, migrate
{"sleep", l_process_sleep},
/* TODO: self, create, kill, suspend, is_suspended, resume, get_name,
* get_pid, get_ppid, migrate
@@
-59,8
+59,9
@@
static const luaL_reg process_functions[] = {
*/
void sglua_register_process_functions(lua_State* L)
{
*/
void sglua_register_process_functions(lua_State* L)
{
- luaL_openlib(L, PROCESS_MODULE_NAME, process_functions, 0);
- /* simgrid.process */
- lua_pop(L, 1);
+ lua_getglobal(L, "simgrid"); /* simgrid */
+ luaL_newlib(L, process_functions); /* simgrid simgrid.process */
+ lua_setfield(L, -2, "process"); /* simgrid */
+ lua_pop(L, 1); /* -- */
}
}