g-wrap and glib container types...

James LewisMoss jimdres@mindspring.com
07 Nov 2000 19:51:30 -0500


>>>>> On 07 Nov 2000 13:55:47 -0600, Rob Browning <rlb@cs.utexas.edu> said:

 Rob> Robert Graham Merkel <rgmerk@mira.net> writes:
 >> Yep, that makes sense.
 >>
 >> However, one minor concern, particularly if you want to wrap parts
 >> of glib itself.  A lot of those functions are access functions
 >> that take a pointer to a glib container and return a void * (a
 >> gpointer, actually) that is a pointer to an entry in the
 >> container.
 >>
 >> Can we pass the returned gpointer to functions that take, say,
 >> Account *?

 Rob> After talking with Bill, I'm going to implement
 Rob> gwp:pointer-token-coerce that'll take a pointer-token and
 Rob> produce a new pointer-token that's of the requested type. i.e.:

 Rob>   (gwp:pointer-token-coerce pt 'Account*)

 Rob> This will be used to implement things like

 Rob>   (gwp:glib-list->list foo 'Account*)

 Rob> OK.  It seems like we have agreement.  I'll get on it.
 Rob> Shouldn't take too long.

 Rob> I still have to deal with your enum patch, but I'll do that
 Rob> while working on this.

The only thing that concerns me about this is you are introducing into
scheme an easy way to cause a segfault.  Maybe implement it this way
in the short term because it's the easiest and lets us get onto other
more important things quickly, but this is a bad long term solution
imo.

Jim

-- 
@James LewisMoss <dres@debian.org>      |  Blessed Be!
@    http://jimdres.home.mindspring.com |  Linux is kewl!
@"Argue for your limitations and sure enough, they're yours." Bach