[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: question about mixing integer keys and other key types in a table
- From: Benoit Germain <bnt.germain@...>
- Date: Sun, 3 Apr 2011 12:09:43 +0200
Hello,
In some tables, I store
items both at integer index keys, without holes, and at string keys,
for some other attributes. When iterating with ipairs, I get the
integer-keyed pairs just fine. But let's imagine that I manage to store in my table entries so that some string key
hashes to the same value as one of the scalar keys. I know this is an
implementation detail, but will this move my scalar indexed pair from
the array part to the hash part of the table, thus creating a hole in the array that
will break what I expect from ipairs iteration?
--
Benoit.