At 12:47 PM -0800 1/22/04, chromatic wrote:
On Thu, 2004-01-15 at 09:16, Leopold Toetsch wrote:

Dan Sugalski <[EMAIL PROTECTED]> wrote:

 > If that's living in an managedstruct, then accessing the struct
 > elements should be as simple as:

 >     set I0, P20['bar']
 >     set S1, P20['plugh']
 >     set P20['baz'], 15

 That's mostly done, except for named keys (I used arrays). If you like
 named keys, an OrderedHash would provide both named and indexed access.

How does an OrderedHash cross the NCI boundary? That is, I know how a ManagedStruct or UnmanagedStruct converts to something the wrapped library can understand -- the PMC_data() macro makes sense. How does it work for an OrderedHash?

I looked at this and wondered where to hang the mapping of names to
array indices.  The data member of the PMC looks full up.

Hang it off the cache slot, and mark the cache as a buffer with the data you need in it. (That's how I'd do it, at least)
--
Dan


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

Reply via email to