Re: [gnome-db] GValue and gda_init()



On 5/9/06, Daniel Espinosa <esodan gmail com> wrote:
After review the code in gda-value.c, and find a remark about that GLib
doesn't register functions to transform a Type to a G_TYPE_STRING, I think
the GDA library *must* register all the functions to transform any type to a
string in the gda_init().

 Now it is done by registering the type in the GType system using the
gda_*_get_type functions, but for the other like integers, boolean and
other, I think it's better to be done by gda_init(). An important case is
GDate, where as a *standar* way, can register a funcition to transform to a
string, using a string representation, that may, or may not, will meet the
system's Locale. May is better to let the developer, to desing it's own
transformation function (or create it in the GDA) to manage the locale
issue.

I'm not in favor of registering transform functions for GLib types as
it leads to potential modifications of the behaviour of applications
using GValue outside libgda and I'd prefer the registering to be done
by GLib itself. For now, libgda uses some custom transform functions
in the gda-value.c file (which allows to handle the locale as needed).

Vivien



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