Re: [gnome-db] Return values of gda_value_*_get



On Wed, 2002-01-09 at 22:49, Gonzalo Paniagua Javier wrote:
> 	The question is: should gda_value_*_get() return (for non-basic
> 	types) a new copy of the value or the value itself?
> 
the existing ones already return a pointer to the static data, that is,
not a newly allocated structure. So for new ones, please do the same.

> 	The fact is that gda_value_get_string() returns a const pointer
> 	to the string stored in a GdaValue while gda_value_get_date()
> 	(which I am modifying right now) returns a GDate created by
> 	g_date_new().
> 
well, that's a different case, since get_date converts the
GNOME_Database_Data structure into a GDate. That's why that function
returns a newly allocated structure.

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]