Re: [Libclc-developers] An alternative clc_list approach + an iterator.
Status: Planning
Brought to you by:
augestad
|
From: Hallvard B F. <h.b...@us...> - 2003-03-26 16:20:22
|
Bj=F8rn Augestad writes: > [typedefs to pointers] > Let's continue to disagree for a while, shall we? ;-) OK. Until the news discussion... >>> Does the design [of iterators] easily create mem leaks? >>=20 >>=20 >> Maybe. It would be safer with >> struct clc_iterator iter; >> clc_iterator_init(&iter, ...); >> because then many iterators would not need to be freed at all. >=20 > Can't do that with an ADT. It has to be allocated since it is an=20 > incomplete type. It doesn't have to be an incomplete type just because users shouldn't access it. Look at various FILE implementations, for example. We could just document that the struct implementation is subject to change and should not be accessed directly. --=20 Hallvard |