Re: Returning ListHandle - bug?



On Thu, 19 Jan 2006, Murray Cumming wrote:

> I don't think that ListHandle is meant to be used in this way.
> It's more for
> GList* -> ListHandle -> vector/list/whatever
> than
> vector/list/whatever -> ListHandle -> vector/list/whatever

The documentation on ListHandle is rather sparse:
| If a method takes this as an argument, or has this as a return
| type, then you can use a standard container such as std::list or
| std::vector.

It suggests that it is just a wrapper around vector/list/deque so
there can be functions that take any STL container.

I used this for a
function
	ustring implode(ustring const& glue, ListHandle const& pieces)
which did basically the same as "implode" in PHP:
	implode(";", {a,b,c}) = "a;b;c"

It looks like this wasn't a good idea - ListHandle wraps GList*, not
STL container. STL container contents are copied which is not good
for my implode.

Regards
Tometzky
-- 
...although Eating Honey was a very good thing to do, there was a
moment just before you began to eat it which was better than when you
were...
                                                      Winnie the Pooh



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