13 Aug 2002 11:21:54 -0500
Content-Type: text/plain; charset=ISO-8859-1
On Tue, 2002-08-13 at 07:01, Ricardo Fern=E1ndez Pascual wrote:
> > As for GList, I have talked with Duncan a bit on the best way to handle
> > G*List (marshalling requirements are a bit tricky here). The current
> > implementation is definitely a hack though.
> I'm just curious, what are those requirements? I can't think of anything
> apart of having a pointer (IntPtr) to the first element of the list. I
> could implement those classes.
The problem is that the "data" member is stored as a gpointer. I suspect
what we will have to do is give up on any hope of guaranteed typesafety
from that and just add a variety of casting-operator accessors for the
common data types. GObject data are easy enough to handle now that
introspection has hit CVS, but struct pointers will _never_ work (no way
for the list class to "sniff" the struct type), so the user will have to
use the StructName.New(IntPtr) construct.
If the lists are mutable, the marshalling situation becomes a lot
trickier because of the necessity of generating IntPtrs. Sometimes this
can be done with an IntPtr constructor, or unsafe code, but this is not
always possible with managed types.
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
-----END PGP SIGNATURE-----