Re: glib: binary trees & threaded main loops (maybe OT?)



On Thu, Dec 05, 2002 at 06:07:06PM +0100, Axel Bock wrote: 
and, second question, I try to index words ("gtk", "something", "weird",
... ) in a b-tree. now I have found g_tree_insert(), but nothing about
HOW it is inserted? if the string is inserted, how does the tree know
*how long* the string is? :-)

The tree only knows about void*, it doesn't actually look at what the
void* points to, except via the GCompareFunc you pass in to
g_tree_new(). This implies that the strings are never copied by value.

Havoc



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