At 5:49 PM +0100 8/13/02, Tom Hughes wrote:
>In message <a05111b10b97e5445dbfe@[63.120.19.221]>
>           Dan Sugalski <[EMAIL PROTECTED]> wrote:
>
>>  Hash should support integer lookup. PerlHash doesn't have to, and may
>>  throw an exception.
>
>I don't follow the logic behind this... Making it work for one but
>not another is tricky - either get_integer on a Key PMC will work when
>the key is a string or it won't.

Nobody's doing a get_integer on key PMCs--we're peeking directly. 
(Integer lookup can also be done via the keyed_int method of the 
vtable)

Basically we need to make sure that the hash we're using as a 
scratchpad can be looked up by integer index for speed reasons. I 
thought we'd split it out into a Hash class the way we'd done with 
Array, but I guess not.

In that case, PerlHash should be able to be looked up by integer key 
for now, and we'll see what we need to do to make things error out at 
the language level.
-- 
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                       teddy bears get drunk

Reply via email to