At 08:16 AM 2/22/2002 -0500, Bryan C. Warnock wrote: >On Friday 22 February 2002 01:01, Melvin Smith wrote: > > I want to emulate a packed structure with Parrot in the way a compiler > > would normally do this for a low level machine. > > > > It just needs traditional notation for setting fields by offset into > > the struct. > > > > I sort of feel that PerlString _could_ handle this, but I'm curious > > if there are any gotchas I'm not aware of. I do see that Strings > > have native (ie. non-unicode) apis so potentially the substr() > > method could be used, and I also see the API for setting > > a void * into struct_val. Is this how we intend to represent class/structs > > in memory? > >Hmmm. Sounds like a job for keyed access to me.
Exactly. If we added this to String I think it would work. -Melvin