lua-users home
lua-l archive

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


On 28 March 2018 at 06:47, Thomas Jericke <tjericke@indel.ch> wrote:
> *         More problematic : strings comparison doesn’t work at all
>
> If my_var == “toto”
>
>                 Will always fails. I got from this list it’s because there
> is a lookup table to speed up and this table is stick to the main State.

this should work.  my hunch is that that "my_var" isn't correctly
interned.  if it's a real Lua string, then it will be comparable.  If
it's a userdata or some reference to an "external" string, then it's
your responsibility to add the metamethods to do the comparison.


-- 
Javier