[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Possible enhancements for Lua 5.2
- From: Wesley Smith <wesley.hoke@...>
- Date: Sat, 25 Jun 2011 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?