title: How to handle with return number given by lua_resume?
body: <p>I have some coroutine handling code like this:</p>
  <pre><code>int coro_re_num = 0;
  int coro_state = lua_resume( coro_lua, master_lua, narg, &amp;coro_re_num);
  
  if ( coro_state == LUA_OK)
  {
      // do something
  }
  else if ( coro_state == LUA_YIELD)
  {
      // do_something
  }
  else
  {
      const char* err = lua_tostring(coro_lua, -1);
      log_error(err);
  }
  
  lua_pop(master_lua, coro_re_num);
  
  </code></pre>
  <p>When coroutine ends with <code>OK</code> or <code>YIELD</code>, it works properly. But when it ends with any error, the last <code>lua_pop</code> always fail, and I noticed the <code>coro_re_num</code> is relatively large (mostly more than 10) which causes stack underflow by <code>lua_pop</code>.</p>
  <p>What does the <code>coro_re_num</code> means when the coroutine ends with error? How to handle it?</p>