why lua version schedule update pass string as parameter to the callback

I’m studying the lua example and mod something for fun. The lua example’s tick function doesn’t contain the parameter so I add it like this.
function tick(dt)
xxxx
end

And then I try echo dt find that is a string type.

bool CCLuaScriptModule::executeSchedule(const std::string& handler_name, ccTime cc){
//blah blah blah
lua_pushfstring(d_state, “%f”, cc);

}

If my func depends on it. The ccTime must be convert to number type again.
So I just mod this to, everything works fine
lua_pushnumber(d_state, cc);

I don’t know why?


Anther I wanna know does the lua version have memory leak? I really want to write my commerial game in lua.

Yes, we have found memory leak. But I don’t know if it is a bug of lua. You can use other version to make sure, and le me know.
Because I am busy these days, and have no time to do it.

Thank you.