Re: Possible enhancements for Lua 5.2
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Possible enhancements for Lua 5.2
- From: Wesley Smith <wesley.hoke@...>
- Date: 2011年6月25日 18:37:56 -0700
> const char* lua_tohstring( lua_State *L, int index, unsigned int *hash );
>
> When writing bindings I usually get the key string in __index/__newindex
> metamethods and compute some hash with them which then I use in a switch. It
> would be nice if I could save the time spent in computing this hash since
> Lua already has one.
>
How could you use the hash in a switch statement if the hash result
isn't a compile-time calculation?
wes