g-wrap-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to deal with GBoxed values and methods


From: Andreas Rottmann
Subject: How to deal with GBoxed values and methods
Date: Sun, 05 Sep 2004 14:14:08 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Hi!

I recently made a change in G-Wrap that should enhance the generic
support. Methods are now specialized on all arguments, and arguments
can also be specialized on basic types, such as <string>. 

This breaks guile-gnome, however, since the values passed around do
not always have the proper class; for instance, we have "GBoxed"
types, which are passed around as GValue smobs (see
gw-spec-utils.scm). One example for this is GtkTreeIter values. To fix
this issue, we must find a way to pass these values as instances of
their class, e.g. <gtk-tree-iter>, so instances/objects of the class
must have a "slot" where we can store the C pointer. 

I'm not yet sure of all the implications that will have, but it seems
we at least have to extend gtype->class, making it create that slot in
the base case (no superclasses). The slot could be just an opaque
smob, or it could be a gboxed value as it is now.

Thoughts?

Regards, Rotty
-- 
Andreas Rottmann         | address@hidden      | address@hidden | address@hidden
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

A. Because it breaks the logical sequence of discussion
Q. Why is top posting bad?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]