PSDoc is fully declared in ps_util.c but not
ps_list.c because only ps_util.c includes ps_intern.h
which provides the full declaration.

in ps_list.h, DLIST refers to PSDoc in the declarations of DLIST.malloc
and DLIST.free, so the type of DLIST in ps_list.c (ps_list.8) is not
the same as the type of DLIST in ps_util.c (ps_util.8), and that in turn
is reflected in the type of functions taking DLIST as a parameter type.

Ideally, you'd include ps_intern.h in ps_list.c but the type system
in this library is such a mess, because the modularity is really 
pseudo-modularity
(ps_intern.h needs "ght_hash_table.h" and probably others as well).
Really they should just declare everything the library needs in one file.

You can hack round it by adding
#pragma incomplete PSDoc
to pslib.h, after the typedef declaring PSDoc.
It's not correct, because PSDoc isn't really an incomplete (opaque) type,
but the structure is so messed up it's probably not worth fussing over it.

Reply via email to