Changeset b1133af9f85966fc31d2bee8a38cb7a8561807fe

Show
Ignore:
Timestamp:
09/02/11 04:46:44 (3 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1314938804 -0400
git-parent:

[55a550bc4ee62ea3e4e4cfd58c6b8100ca04f57a]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1314938804 -0400
Message:

The original approach was right, just messed up the lua_state onto which we were pushing

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/modules/lua.c

    r55a550b rb1133af  
    659659  noit_check_t *check; 
    660660 
    661   noitL(nldeb, "lua: %p resuming\n", ci->coro_state); 
     661  noitL(nldeb, "lua: %p resuming(%d)\n", ci->coro_state, nargs); 
    662662  result = lua_resume(ci->coro_state, nargs); 
    663663  switch(result) { 
     
    790790  noit_lua_setup_module(ci->coro_state, ci->self); 
    791791  noit_lua_setup_check(ci->coro_state, ci->check); 
    792   if(cause) { 
     792  if(cause) 
    793793    noit_lua_setup_check(ci->coro_state, ci->cause); 
    794     noit_lua_resume(ci, 3); 
    795   } 
    796794  else 
    797     noit_lua_resume(ci, 2); 
     795    lua_pushnil(ci->coro_state); 
     796  noit_lua_resume(ci, 3); 
    798797  return 0; 
    799798