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.

My other idea was to wrap the struct in an object and write methods that
set the appropriate array members, but there's still NCI to consider.

Of course, I could be missing something extremely simple, but if no one
ever asks....

-- c

Reply via email to