Merge pull request #4711 from samuele3hu/DispatcherBak1

Improve the coding style
This commit is contained in:
James Chen 2013-12-27 04:18:05 -08:00
commit d3ecc83419
1 changed files with 6 additions and 17 deletions

View File

@ -627,23 +627,14 @@ int LuaStack::executeFunction(int handler, int numArgs, int numResults, const st
}
// get return value,don't pass LUA_MULTRET to numResults,
if (numResults <= 0)
{
if (traceCallback)
lua_pop(_state, 1);
do {
return 0;
}
if (nullptr == func)
{
if (traceCallback)
lua_pop(_state, 1);
if (numResults <= 0 || nullptr == func)
break;
return 0;
}
func(_state,numResults);
func(_state, numResults);
} while (0);
if (traceCallback)
{
@ -651,8 +642,6 @@ int LuaStack::executeFunction(int handler, int numArgs, int numResults, const st
}
}
lua_settop(_state, 0);
return 1;
}