Re: g_list_append() knows how to duplicate data?
- From: David Ford <david linux com>
- To: jrb redhat com
- Cc: Havoc Pennington <hp redhat com>, learfox furry ao net, GTK Application Development List <gtk-app-devel-list gnome org>
- Subject: Re: g_list_append() knows how to duplicate data?
- Date: Tue, 16 Jan 2001 23:53:58 -0800
jrb redhat com wrote:
David Ford <david linux com> writes:
I said that because I was told that it acted like the gtk clist in copying
data in spite of the very simple g_list structure.
Someone misled you.
Unfortunately in my travails, I have noted a lot of people misunderstanding
things and trying to help others with good intentions.
Better documentation for gtk/glib would prevent a lot of this.
You can find documentation at http://developer.gnome.org/doc/API/
Documentation specific for g_list (including it's memory management
system) is found at:
http://developer.gnome.org/doc/API/glib/glib-doubly-linked-lists.html
Thanks,
-Jonathan
Yes, been there done that many times, thank you. :)
May I suggest someone who knows the internals reliably, add fields such as:
data access: <direct|copy> (directly uses the data a user passes|copies the
data a user passes)
return data volatility: <private|static|allocated> (reused internally,
probably not threadsafe|don't free data this function returns|you should free
data this function returns)
etc..
Different functions do different things and they aren't necessarily readily
apparent, especially to new people. The books I have don't make much mention
either.
-d
--
..NOTICE fwd: fwd: fwd: type emails will be deleted automatically.
"There is a natural aristocracy among men. The grounds of this are
virtue and talents", Thomas Jefferson [1742-1826], 3rd US President
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]