Chromatic <[EMAIL PROTECTED]> wrote:

> I'm having odd troubles with "Key not an integer!", which indicates I'm
> doing something wrong.  Still, it *looks* fairly solid, at least for
> getting and setting integers and floats.

>       new $P2, .HashlikeStruct
>       $P2 = $P1

Either:
        new $P2, .HashlikeStruct, $P1
or
        assign $P2, $P1


> pmclass HashlikeStruct extends UnManagedStruct need_ext does hash

I'd not put that in a new PMC class. ManagedStruct inherits from
UnmanagedStruct - it wouldn't be able to use that functionality.

If you make the initializer an OrderedHash, you can access struct
elements by integer or string key. You would only need a test in
char_offset_key, if you have an integer or string key.

leo

Reply via email to