Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
The argument is a userdata, not a Lua task
authorChristophe Thiéry <christopho128@gmail.com>
Wed, 9 Nov 2011 19:19:08 +0000 (20:19 +0100)
committerChristophe Thiéry <christopho128@gmail.com>
Wed, 9 Nov 2011 19:19:08 +0000 (20:19 +0100)
src/bindings/lua/simgrid_lua.c

index a9aa62f..e919383 100644 (file)
@@ -317,7 +317,7 @@ static int l_task_gc(lua_State* L)
  */
 static int l_task_tostring(lua_State* L)
 {
-  m_task_t task = sglua_checktask(L, 1);
+  m_task_t task = *((m_task_t*) luaL_checkudata(L, 1, TASK_MODULE_NAME));
   lua_pushfstring(L, "Task: %p", task);
   return 1;
 }