lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


1.
I am a little unclear on the difference between pushing a c-closure, and a c function. I realize that closure can access upvalues, but if no upvalues are needed is there a difference? Why would I want to use upvalues instead of function parameters?

2.
Does the lua vm distinguish b/n int/floats? i.e., in my extension I was thinking of having this:

T Get<T>()
{
	luaL_checktype( L, -1, LUA_TNUMBER );
	return (T)lua_tonumber( L, -1 );
}

Would I be losing anything by not specializing this for ints?


Thanks.
~S