lua-users home
lua-l archive

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

On Mon, Jun 27, 2011 at 2:13 PM, Patrick Rapin <> wrote:
> Some time ago, I had a similar need and have used pseudo-recursive C macros
> to compute the hash value at compile time:

Thank you for that link. I have also several time tried to implement
such a compile-time hash in C, but without success (neither with
macros, enums, nor templates).
The code of Chris Savoie seems to work however (with optimizations turned on).

Out of curiosity, did you implement the Lua hashing function or something specific to your code (meaning you hash the C string during runtime) ?