Re: GObject Introspection support for GSList or other types without a GLib type



On Sun, 2009-06-14 at 02:30 -0500, Daniel Espinosa wrote:
> How to handle data types without a GLib GType defined.
> 
> On libgda, it define a GType for GError and a GSList becouse these
> doesn't exist on GLib and it uses them as parameters when creating
> properties and events.
> 
> For now may be the library (as Anjuta does) must create its own GType
> definition but with the following rule: the name of the type must be
> defined as "GError" and "GSList", in order to allow g-ri-scanner to
> detects the currect types GError and GSList as the example.
> 
> In GDA it has GDA_TYPE_ERROR and GDA_TYPE_SLIST with "GdaError" and
> "GdaSList", then the scanner tries to find a definition to GdaError
> and GdaSList but they don't exist, when changed this types' names as
> avobe the correct type is detected.

To point out what may be obvious - there is zero advantage of a
<X>_TYPE_SLIST over G_TYPE_POINTER. 

This is true in general, and true for gobject-introspection - if
gobject-introspection finds a property by introspection and deduces a
type of GSList for it, it still doesn't have the element-type. 

- Owen




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