Re: [gnome-db] New patch



On Thu, 2002-01-10 at 15:05, Gonzalo Paniagua Javier wrote:
> > > -GDate *
> > > -gda_field_get_date_value (GdaField *field)
> > > +const GdaDate *
> > > +gda_field_get_date_value (const GdaField *field)
> > >  {
> > >         g_return_val_if_fail (field != NULL, NULL);
> > > -       g_return_val_if_fail (
> > > -               field->attributes.gdaType == GDA_TYPE_DATE,
> > > -               NULL);
> > > 
> > >         return gda_value_get_date (&field->value);
> > >
> > why are you removing that check?
> 
> 	Because now in gda_value_get_date() It is already done:
> 
> return BONOBO_ARG_GET_GENERAL (value, GDA_VALUE_TYPE_DATE, GdaDate *,
>                                         NULL);
> 
> 	BONOBO_ARG_GET_GENERAL does it for me. The same for
> 	gda_field_get_time_value() and *timestamp_value().
> 
> 	Do you still want me to put those lines back?
> 
no, it is not done. There's only a g_assert call which will finish the
program when on debugging mode, and simply print a warning when on
normal mode. That is, there is no check apart from the g_assert, which
does not guarantee there are no crashes.

The check is needed to avoid accessing invalid pointers, so please,
don't remove them.

> > > 	gda-value.c still has a few warnings related to ORBit functions
> > > 	(ORBit_RootObject_duplicate() and CORBA_Object_release()).
> > > 	Somebody, please, take a look at them.
> > >
> > this part looks good, except for the extra const you've added in some
> > places.
> > I've only applied the idl part, so please resend the libgda part. The
> > postgres and test parts look good, but haven't applied them as they need
> > the changes in libgda. So please resend that part (along with the
> > postgres and testing patches), and if it is ok, you can apply yourself
> > with your new CVS account :-)
> 
> 	Ok. So I'll remove all const inserted except those for return
> 	values that are pointers.
> 
> >  
> > > 	My TODO list:
> > > 
> > > 		-gda-test: display the GdaRecordset contents (don't know
> > > 		how!).
> > > 
> > in testing/model.c there's a function (display_data_model or something
> > like that which will do it for you). Also, the schemas function in
> > client.c contain some code you can use as example.
> > BTW, could you also move the postgres-specific parts in client.c to a
> > separate file (postgres.c)? This will make the code cleaner, and then we
> > can add new files for provider specific tests.
> 
> 	Yes, I also think it is a good idea to make a separate file for
> 	specific tests. I'll do.
> 
> 	Give me a few hours and I'll be back with the corrected patch
> 	:-).
> 
dude, you rock! :-)

cheers
-- 
Rodrigo Moya <rodrigo gnome-db org> - <rodrigo ximian com>
http://www.gnome-db.org/ - http://www.ximian.com/



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