I find myself needing a hash table container in a C project which includes Lua. I am wondering if it is possible to use the hash table in Lua as a generic container. I have looked at ltable.h
and all of the functions require a Lua state and seem tied to the Lua environment so I am guessing this is not practical if the data needs to be independent of Lua.
It is possible and the easiest way is just to use the official C API for Lua. No need to dig into the innards of ltable.h.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With