#include "str.h" /* This is meant to be extended, and only has minimal necessary fields. */ typedef str_info (*info_getter) (const str * const restrict , UNUM); struct str_s { UNUM size; /* the size in bytes, not in chars */ char *data; /* a void pointer is too general */ /* polymorphic behaviour */ info_getter getter; };