|
|
||
|
Lua calculates a hash value for strings in order to improve the speed for comparing two strings. If you change the string inside of C, the hash value won't be valid anymore. The hashvalue is used for comparing strings or storing strings in tables as keys (as far as I know).
You could also write a C userdata object that allows you to create a buffer that
you can manipulate. Of course this would require you to write your own functions
to search patterns and so on, so this would be quite some work...
-- Philippe Lhoste -- (near) Paris -- France -- http://Phi.Lho.free.fr -- -- -- -- -- -- -- -- -- -- -- -- -- --