189 bool cxListIsStoringPointers(CxList *list) { |
194 bool cxListIsStoringPointers(CxList *list) { |
190 return list->climpl != NULL; |
195 return list->climpl != NULL; |
191 } |
196 } |
192 |
197 |
193 // </editor-fold> |
198 // </editor-fold> |
|
199 |
|
200 void cx_list_invoke_destructor( |
|
201 CxList const *list, |
|
202 void *elem |
|
203 ) { |
|
204 switch (list->content_destructor_type) { |
|
205 case CX_DESTRUCTOR_SIMPLE: { |
|
206 list->simple_destructor(elem); |
|
207 break; |
|
208 } |
|
209 case CX_DESTRUCTOR_ADVANCED: { |
|
210 list->advanced_destructor.func(list->advanced_destructor.data, elem); |
|
211 break; |
|
212 } |
|
213 case CX_DESTRUCTOR_NONE: |
|
214 break; // nothing |
|
215 } |
|
216 } |
194 |
217 |
195 void cxListDestroy(CxList *list) { |
218 void cxListDestroy(CxList *list) { |
196 switch (list->content_destructor_type) { |
219 switch (list->content_destructor_type) { |
197 case CX_DESTRUCTOR_SIMPLE: { |
220 case CX_DESTRUCTOR_SIMPLE: { |
198 CxIterator iter = cxListIterator(list); |
221 CxIterator iter = cxListIterator(list); |