Ok, I finally got the new API working.
There are some changes for the API documentation though. Functions
pdf_list_iterator() and pdf_list_iterator_from_to() may fail when calling
pdf_alloc() so the caller must check for the NULL value before using it.
No problem. We can change the documentation in gnupdf.texi.
inline pdf_status_t
pdf_list_iterator_free (pdf_list_iterator_t *iterator)
{
- gl_list_iterator_free (iterator);
+ gl_list_iterator_free ((gl_list_iterator_t*)(iterator->gl_iterator));
+
+ pdf_dealloc (iterator->gl_iterator);
+
return PDF_OK;
}
Is that `pdf_dealloc' on iterator->gl_iterator ok? I think that the
previous `gl_list_iterator_free' call is disposing the memory pointed
by iterator->gl_iterator.