Re: computing the hashcode of lua objects in a program
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: computing the hashcode of lua objects in a program
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2021年4月28日 10:10:58 -0300
> However, long strings can have multiple copies inside Lua, so equal
> strings can have different addresses.
> string.format("%p %p", string.rep("x", 40), string.rep("x", 40))
0x55a34f26acc0 0x55a34f26acc0
> string.format("%p %p", string.rep("x", 41), string.rep("x", 41))
0x55a34f26b1b0 0x55a34f26b200
-- Roberto