Re: [gnome-db] Please, tell me any thing about GdaValue & GValue work
- From: Daniel Espinosa <esodan gmail com>
- To: Vivien Malerba <vmalerba gmail com>
- Cc: gnome-db-list gnome org
- Subject: Re: [gnome-db] Please, tell me any thing about GdaValue & GValue work
- Date: Fri, 24 Jun 2005 10:17:01 -0500
A type G_VALUE_TYPE_NULL and G_VALUE_TYPE_UNKNOWN, correspondig with
the G_TYPE_NONE and G_TYPE_INVALID respectibaly, are an uninstantable
types, and correspond to an unset (uninitialiced) GValue; but when you
try G_VALUE_TYPE(value) and the is unset value, it returns
G_TYPE_NONE.
Then in the function gda_value_get_type could return
GDA_VALUE_TYPE_NULL when the value is uninitialized or resently
created with value = g_new0(GValue,1)
I don't know how is used the GDA_VALUE_TYPE_UNKNOWN in GDA, but in the
case of GValue you never have an unknown type stored, becouse you
can't initiate with this type. If you use gda_value_new_null it MUST
return an uninitaliced GValue.
The is necesary to delete the line: g_value_init(value,
G_VALUE_TYPE_NULL) to have:
GdaValue *value;
value = g_new0 (GdaValue, 1);
value->value = g_new0(GValue, 1);
return value;
What is your opinion?
2005/6/23, Vivien Malerba <vmalerba gmail com>:
> On 6/22/05, Vivien Malerba <vmalerba gmail com> wrote:
> > On 6/22/05, Daniel Espinosa <esodan gmail com> wrote:
> > > Please, tell me any thing about GdaValue port to use GValue as the container.
> > >
> > > Finally, I donwload GDA/GNOME 1.3.3 and patch the gda-value.c/.h and
> > > gda-blob.c/.h files with the modifications and after a very little
> > > modification in one line, on some providers, and in one line in
> > > gnome-db libs, the code compile with out problems.
> > >
> > > Now, I can't run gnome-database-properties, becouse a debuged error
> > > on gnome-db-data-set.c; may I'll search for the error shortly.
> > >
> > > Then, I'll develop a simple app, to test the use of GdaValue API;
> > > while I'm waiting for your opinion about the last PATCH sended.
> >
> > Compiling with it right now...
> >
>
> I've done some further corrections to make it almost work, but I've
> got a problem with the NULL data type; the following code creates a
> warning:
>
> value->value = g_new0 (GValue, 1);
> g_value_init (value->value, G_VALUE_TYPE_NULL);
>
> the warning is:
> GLib-GObject-WARNING **: can't peek value table for type `void' which
> is not currently referenced
>
> Any Idea why?
>
> I'm sending you my latest modifications done on top of yours (the
> patch is to be applied an the CVS version).
>
>
>
--
Trabajar, la mejor arma para tu superación
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]