- // Get maestro state. In case we're calling Lua from
- // C only, this will be NULL -- no Lua code has been
- // executed yet and hence, the SimGrid module has not
- // yet been loaded.
- // NOTE: After executing the lua_pcall() below,
- // sglua_get_maestro() will not be NULL, since the
- // SimGrid module was loaded!
- lua_State* L = sglua_get_maestro();
-
- // We may want to remove the task_copy_callback from
- // the SimGrid module if we're using C code only (this
- // callback is used for Lua-only code).
- int remove_callback = FALSE;
- if (L == NULL) {
- L = luaL_newstate();
- remove_callback = TRUE;
- }