CCStructs offers an API to handle struct values. The library cannot reference the
concrete types of struct the client libraries will use, so it just defines a placeholder for
them.
Type of struct values used as argument to CCStructs functions. This is just a forward type
declaration: there is no actual declaration of this type.
When using this type we need to explicitly cast a pointer to client struct values to a pointer to
ccstruct_core_t. For example, when defining a constructor for the dumpable trait:
ccstructs_dumpable_T
ccname_trait_new(ccstructs_dumpable_T, spiffy_t) (spiffy_t * S)
{
return ccname_new(ccstructs_dumpable_T)(ccstructs_core(S),
&ccname_trait_table(ccstructs_dumpable_T, spiffy_t));
}
Cast the pointer S to ccstructs_core_t *.
Type of functions implementing the destructor for struct instances. Functions of this type must
always return to their caller, never raising an exception.
This document describes version 0.3.0-devel.3 of CCStructs.